Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in chapter end quiz

 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one doubt in the quiz exam of marcus green .
Question is from Webcontainer model quiz.

Which of the following statements are true?
Choose at least one answer.
a. HttpServletResponseWrapper takes a constructor parameter of type HttpServletResponse
b. Filters are called in the order they appear in the deployment descriptor
c. Methods of the wrapper classes must not be overridden
d. Filters are an example of the Intercepting Filter design patttern
e. Filters can only be invoked on incoming requests, and not on a dispatcher forward or include


Correct answer is a b d


I am confused about option b it is said that filters are called in the order they appear in the deployment descriptor.

But the order of invocation may differ depending upon whether we are using <servlet-name> in the filter mapping or we are using <url-pattern> .
Please explain
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following link has the answer of your question

Request processing model
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When in doubt check the book's errata on the website. I found many incorrect answers in my version of the book
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic