aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on 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 on "dispatcher" element in "filter-mapping"" Watch "Doubt on "dispatcher" element in "filter-mapping"" New topic
Author

Doubt on "dispatcher" element in "filter-mapping"

H Pathak
Greenhorn

Joined: Dec 20, 2006
Posts: 28
1. In filter-mapping, if no dispatcher element is specified, then by default, the dispatcher element is "request" (since the filter gets called during the client request)

If we change the mapping to set , does this mean that the filter will be called only on include action (from another servlet or jsp), or will it also be called on a client request?


SCJP 1.4 - cleared<br />SCWCD 1.4 - cleared!!
H Pathak
Greenhorn

Joined: Dec 20, 2006
Posts: 28
folks, any idea?
Saurabh Kumar
Ranch Hand

Joined: Aug 21, 2006
Posts: 56
<dispatcher>INCLUDE</dispatcher>


With this, the filter will be called only on include().

Thanks and regards,
Saurabh
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Saurabh is correct.

REQUEST is the default if no dispatcher tags are given, but if you specify a dispatcher tag and still want REQUEST in the mix, you'll need to explicity add REQUEST as a dispatcher tag value as well.

For reference, this topic is on HFSJ page 679.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on "dispatcher" element in "filter-mapping"