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 doFilter blocking further request 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 "doFilter blocking further request" Watch "doFilter blocking further request" New topic
Author

doFilter blocking further request

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
Hi,
How it is possible for doFilter() to block further request processing.

thnx in advance


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

By not calling doFilter of the FilterChain, the request will not be further processed. This will then be the responsability of the filter to handle the the response.


[My Blog]
All roads lead to JavaRanch
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
In case there is only one filter in chain and i do not call doFilter, will the web resource still be called, keeping in mind blocking further request processing

thnx in advance
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Even with only one filter, if you do not call FilterChain.doFilter,
the next target (for example, a servlet) will not be invoked by the container.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doFilter blocking further request
 
Similar Threads
doFilter() method clarrification please
Filters and Wrappers (HFS)
Confused about doFilter() - Filters and Wrappers Mock in HFSJ
Chapter 12 Coffee Cram
Filter Question