• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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?
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic