File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Harshit Patel
Ranch Hand

Joined: Dec 20, 2006
Posts: 37
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, SCWCD 1.4, TOGAF 9.1 (Foundation)
Harshit Patel
Ranch Hand

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

Joined: Aug 21, 2006
Posts: 56

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

Thanks and regards,
Marc Peabody
pie sneak

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:
subject: Doubt on "dispatcher" element in "filter-mapping"
It's not a secret anymore!