Ideal Way Of Exception Handling In Multi Layer Java Web Application

Exception handling in web application is indeed a tricky task and it varies according to scenarios. There are no fix rules but yes I will give you a generic idea about better way of exception handling. Generally well structured application has four layers: Presentation Layer (JSP/HTML), Business Logic Layer (POJO containing business logic) and Database Access Layer (POJO to interact with Databse) and Data Layer(Database itself). First I will enlist all possible exception handling strategies and then describe suitable strategy for each layer. (more…)