shashank pratap wrote:In Head First Servlets and jsp
on page no. 710 in the Important black box " Filters with matching URL patterns are placed in the chain in the order in which they are declared in the DD"
on page no.712 request path -> /Recipes/HopsList.do should have the sequence 1,2,5 but in the answer on page 727 its 1,5,2
on page no.712 request path -> /Recipes/Modify/ModRecipes.do should have the sequence 1,4,5 but in the answer on page 727 its 1,5,4
can any one tell me the reason , and how is it working?
Please help me .
Shashank.
Hello shashank pratap. Perhaps this is to late, but I am studying the very same book and had your very same question. I have just solved when I was typing the xlm code. Here is the reason:
For Filter2 and for Filter4 they are using
<servlet-name> tag and NOT <url-pattern>, as done for Filter1, Filter3 and Filter5. And according to what they say on page 710, the container places first the matching url-patterns and after that, the servlet-name matching...name?
Thanks for asking, because I have just solved my question because of yours
Best reggards!