Prepare for your Next Interview
This is a discussion on Invoke JSP error page from servlet within the JSP forums, part of the Web Development category; Can I invoke a JSP error page from a servlet?...
|
|||
|
Re: Invoke JSP error page from servlet
Yes we can do this. you need to write
<error-page> <exception-type>javax.sql.SQLException</eception-type> <location>error.jsp</location> </error-page> Just add the above code to web.xml file and when ever an SQLException is raised and not handled in the Servlet it will check in the web.xml for this exception and will be handled by the page (may be servlet also) given in the location sub-element. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| why we shift Servlet to JSP ? | psuresh1982 | JSP | 5 | 06-30-2008 09:09 AM |
| Access all browsers using generic servlet | guptakcsg | JSP | 1 | 03-07-2007 02:30 AM |
| Replication of request using generic servlet | guptakcsg | JSP | 0 | 03-06-2007 06:47 AM |
| Constructors in servlet concept | JobHelper | JSP | 2 | 01-11-2007 10:10 AM |
| Path for storing JSP or servlet files | JobHelper | JSP | 1 | 01-05-2007 12:48 PM |