This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 3827

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]
 
Don't get me started about those stupid light bulbs.
 
subject: JSP error page and exception handle