Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

JSP Error page not getting displayed

Hi i have designed one exception class.
What the process follows is:

I am clicking a button from my welcome.jsp page to get connection to the database which hits my makeConnection servlet.The makeConnection servlet calls getConnection() method of some another class .In that other class i m forcefully making runtime error so that i can display my jsp error page.But i am getting the conventional jsp error page provide by Tomcat .

So how to make my error page display if the exception is generated when my servlet takes use of some model class which(the model class) generates the exception?

Thanks,
Jignesh
[643 byte] By [j.gohel] at [2007-11-11 8:16:28]
# 1 Re: JSP Error page not getting displayed
Your question is very unclear, but there is one thing for sure. You are messing around with connections too much and disregarding MVC in general.

For configuring error page in a web application, there are two ways of doing it:
1. Configure the error page against the HTTP error codes.
2. Configure the error page for specific exceptions [specify the base class encompassing the exceptions, if all have the same error page].

Check the web.xml deployment descriptors for the exact details.
aniseed at 2007-11-11 22:35:52 >