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

Filters and Wrappers (HFS)

 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • 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."
 
sundar katluri
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic