JSP, Filter and Forward

Filters generally applied to corresponding requests. But when the request is forwarded from one servlet to another source, that will not be processed with Filter. (I checked with Tomcat 4.1). We need to add some more parameters with Filter mapping as noted below.

<filter-mapping> <filter-name>VJFilterTest</filter-name> <!–<servlet-name>VJServlet</servlet-name>–> <url-pattern>/servlet/MyTest</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> ————————————————— *Free* software is a matter of liberty not price. You should think of “free” as in “free speech”.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s