• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Doubt in ordering of filters

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In page 678 it given that there are some rules for the orderin which filters are invoked but this conflicts with the next page exercise.

please help me how filters are invoked and how it takes place what is the procedure to be followed in finding the order...



Please help me of how filter sequence is obtained for each Request path from above specified filtes..

Thanks in Advance...
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harinath,
You've not mentioned the book name you're referring.

You can configure the DD to create a filter chain so that each filter is executed in a predefined order. The order of <filter-mapping> elements in the DD determines the execution order of the filters applied to web components that match the <url-pattern> tag. According to the servlet specification, the order the container uses in building the chain of filters to be applied for a particular request URI is as follows:
1. First, the <url-pattern> matching filter mappings in the same order that these elements appear in the DD.
2. Next, the <servlet-name> matching filter mappings in the same order that these elements appear in the DD.
This means that a filter mapped with the <url-pattern> element is always preferred over another filter mapped with <servlet-name> element.

I hope this will help.

Regards,
[ June 08, 2008: Message edited by: Kunal Jag ]
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic