File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Harshit Patel
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Harshit Patel
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
folks, any idea?
 
Saurabh Kumar
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<dispatcher>INCLUDE</dispatcher>


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

Thanks and regards,
Saurabh
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic