Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Filter Ordering

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one please explain me how sequencing of Filters works in the DD. I am unable to get it.
Please explain in detail.
 
Ranch Hand
Posts: 124
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
Well for ordering of filters ----->

1: First you consider all the filters < that match the URL pattern of the client > in the same order as they appear in D.D
2 : List them in the same order you match them.LIST1
3 : Now after all matching URL-Patterns,consider all servlets < that match the URL pattern of the client > in the same order as they appear in D.D
4 : List them in the same order you match them.LIST2
5 : Now finally append LIST1 + LIST2..
So remember ..ALL MATCHING URL_PATTERNS FIRST AND THEN ALL MATCHING SERVLETS
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to make it clear,


url-pattern takes precedence over servlet-name

Here is how to configure filter mapping:

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remember just 2 words.. EDiT US

EDiT (Exact, Directory, exTension) This is the sequence in which container will try to map the URL to the servlet.

US (URL-Servlet) This is the sequence in which container will try to order filters as per DD sequence

Cheers....
Atul Samnerkar
[ September 17, 2008: Message edited by: Atul Samnerkar ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic