• Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters & Dispatchers  RSS feed

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a little confused about the <dispatcher> element of <filter-mapping> in web.xml.

What does this do exactly?

What values can I use for dispatcher?

What is the default behavior if I exclude <dispatcher> entirely?

Thanks,

Drew
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the XML Schema for the deployment descriptor:


The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE,
and ERROR. A value of FORWARD means the Filter will be applied
under RequestDispatcher.forward() calls. A value of REQUEST
means the Filter will be applied under ordinary client calls to
the path or servlet. A value of INCLUDE means the Filter will be
applied under RequestDispatcher.include() calls. A value of
ERROR means the Filter will be applied under the error page
mechanism. The absence of any dispatcher elements in a
filter-mapping indicates a default of applying filters only under
ordinary client calls to the path or servlet.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!