File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSP error page and exception handle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP error page and exception handle" Watch "JSP error page and exception handle" New topic
Author

JSP error page and exception handle

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi all,

My exception jsp is like:
. And I also created the ErrorPage.jsp like:
.
When I tried to run the exception jsp, I just received the HTTP 500 issue, but not be navigated to the ErrorPage.jsp.
If I remove the <%@page isErrorPage="true" contentType="text/html; charset=UTF-8"%> from the ErrorPage.jsp and also remove the <%=exception%>, then the exception jsp can be navigated to the ErrorPage.jsp.
Could you please advice?


SCJP 1.4 SCJD
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Zhixiong Pan wrote:When I tried to run the exception jsp, I just received the HTTP 500 issue, but not be navigated to the ErrorPage.jsp.
If I remove the <%@page isErrorPage="true" contentType="text/html; charset=UTF-8"%> from the ErrorPage.jsp and also remove the <%=exception%>, then the exception jsp can be navigated to the ErrorPage.jsp.

The code should work as it is.. But how you invoke your first JSP (which generate the exception)?, where are those JSP files located inside the application?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
 
subject: JSP error page and exception handle
 
Similar Threads
isErrorPage and errorPage attributes
Very basic question about using JSTL
Error page does not show my exceptions
errorPage not working properly
Problem with forwarding page towards error page