• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter Chain order

 
Clint Wilde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Head First SCWCD study guide book on page 695, it says that the url pattern /Recipes/HopsList.do would hit the following filters:

1,5,2

However, I think they should hit 1,2,5, because it says on page 678 that 'filters with matching URL patterns are placed in the chain in the order in which they are declared in the DD' If all filters match the url-pattern in the DD, how could a filter declared second in the DD be placed forst in the chain?

Can anyone explain this?
 
Clint Wilde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out myself. <url-pattern>s are evaluated before <servlet-name>s, so the order in this example was figured out this way.
 
Gaurav Sahni
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. Almost every body was stumped by this question for the first time.


Regards,
Gaurav.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic