• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP error page and exception handle

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic