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

 
kathir vel
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In HFSJ page680 there is excercise , How the container will order the filters in Filter Chain?
I thought the order(Container will order Filters based on the order the Filters declaredd in DD),for the following requests are :

/Recipes/HopsList.do Filters : 1,2,5
/Recipes/Modify/ModRecipes.do Filters : 1,4,5

But the answers are wrong.1,5,2 and 1,5,4.
Can anyone explain how?
Is it only one FilterChain object for the whole application? Advance Thanks.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this wrong the first time too!

It matches the URL pattern first then the servlet name. First pass is thru the entries trying to match the URL patern, then back to the top of the list and thru again matching by Servlet name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic