This is a example on filter order execution in
Servlets and
JSP in Hed first Book
He tells us to write the order in which the filters will be executed. It is gives as bellow
The url
pattern given is
/Recipes/HopsReport.do (according to me 1,5) (what actually is 1,5)
/Recipes/HopsList.do (according to me 1,2,5) (what actually is 1,5,2)
/Recipes/Modify/ModRecipes.do (according to me 1,4,5) (what actually is 1,5,4)
/HopsList.do (according to me 5) (what actually is 5)
/Recipes/Add/AddRecipes.do (according to me 1,3,5) (what actually is 1,3,5)
The order should be the order in which they have been declared. According to that for second one it should be 1,2,5 but in the book it is mentioned as 1,5,2. I don't get it. Filter5 is declared after Filter2. But still Filter5 get executed before Filter2. So is the case with all other urls. Where my understanding is wrong. please help me.