In the SCWCD study kit by Hanumant Deshmukh (Manning Publications), on p.395 under the section " Important points to remember about filters" , there is a point saying,
" Filter associated with a resource are not executed when a request is sent to the resource through a RequestDispatcher. This is done in order to prevent a filter calling itself and thus entering into a livelock. "
what does this means ? Can anybody explain, what the author is trying to say ?
To know recursion, you must first know recursion...
posted 11 years ago
Think about the mess. You have one servlet (S) in your application, which maps through filter (F). Filter F does nothing more than dispatch the request on to S, which then goes to F which dispatches to F, which goes to F, which dispatches to F, which goes to F. On and on. There is the possibility that the request will never be handled, and worse--the server would be consumed with pointless CPU computations. Fun, huh?