views:

35

answers:

1

In the servlet 2.4 spec you can define dispatchers in the filter config [REQUEST | FORWARD | ERROR | INCLUDE].

When the filter is invoked, how can I tell from which condition it was invoked from i.e. how can I tell if it was a request or an include or a forward?

+2  A: 

The "javax.servlet.*" request attributes contain information about the conditions that led to the filter being invoked.

erickson
Good info, but there is this exception: If getNamedDispatcher() is used to obtain a dispatcher to do the include() or forward(), no attributes are set. Also, is this resin specific?
slappybag