This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3816

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]
 
wood burning stoves
 
subject: JSP error page and exception handle
 
Similar Threads
Very basic question about using JSTL
Error page does not show my exceptions
errorPage not working properly
isErrorPage and errorPage attributes
Problem with forwarding page towards error page