• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter Ordering

 
gurneeraj singh
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • 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.
 
Surajsingh Thakur
Ranch Hand
Posts: 124
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to make it clear,


url-pattern takes precedence over servlet-name

Here is how to configure filter mapping:

 
Atul Samnerkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic