Problem invoking filter

Hi,

I have an existing application with java 1.3 specifications. I have servlets and JSPs in the appication where I am using requestdispatcher to forward control to JSPs. I want to invoke a filter everytime the servlet forward the control to any JSP in my application.

I did the mapping as

<filter>

<filter-name>Filter1</filter-name>

<display-name>Filter1</display-name>

<filter-class>pkg.Filter1</filter-class>

</filter>

<filter-mapping>

<filter-name>Filter1</filter-name>

<url-pattern>*.jsp</url-pattern>

</filter-mapping>

Options already tried:

1) Coding only servlet mapping.

2) adding servlet mapping to the above mapping.

With the above mapping, the filter is not getting executed when request is forwarded to JSP.

When I am adding servlet mapping, the filter is invoked and as I am modifying the response in the filter, I am getting response already committed.

Can someone please let me know what is going wrong in my setup and it would be great if some can share thier code and filter-mapping with me.

email: fundoo.code@gmail.com

Thanks in advance...

[1264 byte] By [fundoo.codea] at [2007-11-26 18:06:41]
# 1
Starting with Java Servlet 2.4 you can use the <dispatcher> element in the <filter-mapping> element:<dispatcher>INCLUDE</dispatcher><dispatcher>FORWARD</dispatcher>
beradriana at 2007-7-9 5:37:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> Starting with Java Servlet 2.4 you can use the

> <dispatcher> element in the

> <filter-mapping> element:

> > <dispatcher>INCLUDE</dispatcher>

> <dispatcher>FORWARD</dispatcher>

>

We are still using WAS 5.

Is there any work around for running it with servlet 2.3.

fundoo.codea at 2007-7-9 5:37:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...