| 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: 4726
|
|
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.
|
 |
 |
|
|
subject: Doubt on "dispatcher" element in "filter-mapping"
|
|
|