This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 14688
    
  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: 14688
    
  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.
 
GeeCON Prague 2014
 
subject: doFilter blocking further request