• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP error page and exception handle

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic