• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we invoke filters programatically???  RSS feed

 
Maya Dolas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I encountered this question(true/false kind) on Marcus simulation exam where one option was

A filter can be invoked either through being declared in WEB.XML or explicitly within a programmers code.

I marked it true as in case of filter chaining we do invoke the other filter in chain by calling .

However I got the answer wrong. I am unable to comprehend that despite the fact that we give a call to the next filter in the filter chain, how is it that we can conclude that filter cannot be invoked through program.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that call is to the FilterChain, not any particular filter. At that point you're merely handing control back over to the container. There might be another filter there, there might not. You don't know. Only the container controls it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!