Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Servlets 2.4 Specification Questions  RSS feed

 
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Servlet Specification 2.4


SRV.9.9.2 Error Pages

1.Error-page declarations using the exception-type element in the deployment
descriptor must be unique up to the class name of the exception-type. Similarly,
error-page declarations using the status-code element must be unique in the
deployment descriptor up to the status code
.


2.The error page mechanism described does not intervene when errors occur
when invoked using the RequestDispatcher or filter.doFilter method. In this
way, a fillter or servlet using the RequestDispatcher has the opportunity to handle
errors generated.
--------------------------------------------------------------------------------------------------

SRV.8.1.1 Query Strings in Request Dispatcher Paths

3.Parameters specifed in the query string used to create the RequestDispatcher
take precedence over other parameters of the same name passed to the included
servlet. The parameters associated with a RequestDispatcher are scoped to apply
only for the duration of the include or forward call.

--------------------------------------------------------------------------------------------------------

Q1.Please explain what does the text in bold means "Unique up to the class name,Unique up to the status code" in the first statement.

Q2. What does " error page mechanism described does not intervene when errors occur
when invoked using the RequestDispatcher or filter.doFilter method" means ?

Q3.Can anyone provide an example for the third statement
 
Bartender
Posts: 4097
63
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Q1.Please explain what does the text in bold means "Unique up to the class name,Unique up to the status code" in the first statement.


You can have multiple error-page declarations with unique class types in the hierarchy of the exceptions along with specific type of exception classes (the subclasses of those) which will be invoked for specific types which they meant to be.

Q2. What does " error page mechanism described does not intervene when errors occur
when invoked using the RequestDispatcher or filter.doFilter method" means ?


That means this Error Page mechanism does not invoked in these scenarios, you may handle the errors yourself in these cases.

Q3.Can anyone provide an example for the third statement


Well, it says when you create a RequestDispatcher (with parameters) for a request the parameter(s) came with the original request with the same name will be replaced by the new ones.

Eg:

 
Do you want ants? Because that's how you get ants. And a tiny ads:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!