• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

doubt on page no.680(old edition) and pageno.712 for new edition HFSJ

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello;

The answer given for request path /Recipes/HopsList.do
Filter sequence given in HFSJ is Filters : 1, 5, 2..

My query is as per the rule of sequence(exact, Directory then extension)
Answer should be Filters : 2, 1, 5

Please correct me and explain me if i'm wrong..

Thanks & Regards;
Brijesh Shah
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Re-read the rules for ordering filters - black box on page 710 in edition 2.

Filter rules are DIFFERENT to normal rules for determining request routing - FORGET exact/directory/extension when looking at filters.

The rules are broadly:

1) ALL URL-PATTERN filters that match in the order then appear in the DD.
2) THEN any SERVLET-NAME filters that match (in order they appear).

So 1 & 5 are the two URL-PATTERN filters, then 2 is the SERVLET-NAME filter. Answer 1 5 2

Your suggested answer has the 2 (SERVLET-NAME) appearing before the URL-PATTERN ones!

HTH - Rufus.
 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rufus I got it..
[ September 25, 2008: Message edited by: Brijesh shah ]
 
catch it before it slithers away! Oh wait, it's a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic