• 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

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

 
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic