Hi Nilesh,
concept of order in which filters are invoked is clear in HFJS.
order of filters is based on two conditions :
first, container will consider filters in the order they are declared in DD.
second, container will put the filters that are declared with url
pattern tag first into queue. then it will consider filters for specific match.
in the problem mentioned above, when container receive request for /Recipes/HopsReport.do, container will consider all filters whose url-patterns match with the requested resource. i.e. fillter 1 and filter 5. when container traverse through DD, it encounter filter 1 first. so filter 1 will be executed first.
consider, /Recipes/HopsList.do for this request, 3 filters do have match. filter 1, filter 2 and filter 5.
container will traverse through DD for matching url pattern and it finds filter 1 and filter 5. so these 2 are added into queue. againg container checks for specific match by comparing
servlet name tag. it finds specific match with filter 2. filter 2 will be added to queue.
hence, the order in which filters are executed is filter 1, filter 5 and filter 2.
hope it will be clear now.