Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

handling exceptions

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which statements are correct about exceptions in servlets?

1) If there is defined an error page for an exception and a servlet included through a RequestDispathcer generates an exception, the standar mechanism of calling that error page is not used, so the calling servlet can process the excpetion.
2) The element in the DD used to specify where the error page can be found is: <url-pattern>
3) If a servlet generates an exception not defined in a error page then the servlet container sets the response status 500
4) If a servlet generates a ServletException or subclass and no match is found in the error pages defined in the DD then, the servlet container tries again to find a match with the wrapped exception which is obtained by calling ServletException.getRootCause().

Answer 1,3,4
I understand option 2 is incorrect and option 3,4 is correct. Can someone explain option 1.
[ December 11, 2008: Message edited by: Julian Justin ]
 
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Julian can you please Quote Your Source...
 
Anoopriya Muthuswaami
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ankit Garg:
Julian can you please Quote Your Source...



Its from http://www.javaranch.com/carl/SCWCD.htm
 
Water! People swim in water! Even tiny ads swim in water:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic