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

Filters chaining order

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I�m studing the HFSJ�s Filter Chapter and I�ve got a trouble in that exercise:


The answer says:
/Recipes/HopsList.do - Filter Sequence: F1, F5, F2
/Recipes/Add/AddRecipes - Filter Sequence: F1, F3, F5

It�s not right to me because I read in the book the filters chain is defined by finding all matches URL patterns and its order is the same defined in the DD. I figured out that its not defined by precedence order of the URL patterns because the first answer I listed would be F2, F5, F1. I�m fooled with this question! What is the right rules for Filters order??!
Can someone help me with my doubt?

Thanks all.
[ September 02, 2008: Message edited by: Victor Dolirio ]
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even i got confused with this in my first reading of HFJS.
Carefully look at the tags in the book...

It is not
<url-pattern>/Recipes/HopsList.do</url-pattern>
however it is
<servlet-name>/Recipes/HopsList.do</servlet-name>

In case of filters, container decides the squence based on "US" (URL-Servlet) Hence the sequnce given in the book is correct.

Cheers...
 
Victor Dolirio
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
really, i don�t paid attention for this... thank you
[ September 03, 2008: Message edited by: Victor Dolirio ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic