File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt regarding filters. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt regarding filters." Watch "Doubt regarding filters." New topic
Author

Doubt regarding filters.

Gaurav Sahni
Ranch Hand

Joined: Sep 03, 2003
Posts: 56
Greetings...

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 ?

Gaurav.


To know recursion, you must first know recursion...
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
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?


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt regarding filters.