• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Filters and Wrappers (HFS)

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pg 703, Question 5?

Option E: (True / False)
A filter's doFilter() method must call doFilter() on the input FilterChain() object in order to ensure that all filters have a chance to execute.

As per author, Option E is incorrect because calling doFilter() is not necessary if a filter wishes to block further request processing.

My Question: Why is this incorrect? Please help me understand this. The question is NOT whether "A filter's doFilter() method must call doFilter() on the input FilterChain() object" BUT "A filter's doFilter() method must call doFilter() on the input FilterChain() object in order to ensure that all filters have a chance to execute."
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the same question while checking the answers (coffee cram) on HFS!!

Is this question formatted wrong??
ofcourse
"doFilter() is not necessary if a filter
wishes to block further request processing." --> this is correct
but the question here is "giving chance to other filters in the chain" that is only possible if you call chain.doFilter(req,resp).
am I wrong?
 
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic