Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How Servlet calls jsp error page, when error occurred in Servlet?  RSS feed

 
thomas davis
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How Servlet calls jsp error page, when error occurred in Servlet?
Does any of the conditions given below satisfy the above query ?
1.JSPException passed to JSP as a parameter
2.Using request dispatcher which saves the error in the coookie
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm wrong, but don't you put errors and their corresponding Error Pages in the web.xml document?
Mark
 
Sloan Bowman
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not 100% sure how the container/AppServer determains which Exceptions are caught and sent to the error page but if you want a global error page you do specify this in your web.xml file. You can create filters or use struts frame work if you are looking to create custom error pages or simply print out the Exception.getMessage() in your error page. Hope this helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!