Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

doubt in chapter end quiz

 
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
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following link has the answer of your question

Request processing model
 
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
 
A tiny monkey bit me and I got tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic