Exception Handling in JSP

Exception Handling is a process of handling exceptional condition that might occur in your application. Exception Handling in JSP is much easier than Java Technology exception handling. Although JSP Technology also uses the same exception class object.

Example of isErrorPage and errorPage attribute

Exception Handling in JSP

We can handle the exceptions in jsp by specifying error Page in the page directive, <%@ page errorPage = "errorPage.jsp">. If any exception will be thrown then the control to handle the exception will be passed to that error page where we can display a information to the user about what’s the reason behind throwing the exception.

Example of JSP isErrorPage and errorPage attributes



If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: