• 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

problem in Filters

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

refer the SHARPEN YOUR PENCIL on hfsj page 680
as per me, the sequence of filter executon for 2nd and 3rd entries is

1,2,5 and 1,4,5 respectively

on page 695,hfsj says it is 1,5,2 and 1,5,4 . Can anybody convince me how is this true ?

As per me -

1. first the container locates all fileter ( of those declared in the
D.D ) that have common url-patterns
2. it then executes them in the order in the order in hwich they are
executed.

as per the above 2 rules, my answers seem to be valid.

please help out.
niranjan
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Filter 2 and 4 contain <servlet-name> instead of <url-pattern>
And it is mentioned in HFSJ P-678 that first all the matching <url-pattern> will run. Only after that there will be the turn for matching <servlet-name>
to run.

Thati s why answer in HFSJ is correct.
Amit
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot amit.

i got your point.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic