problem Configuring filter in existing application

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>

<servlet-name>Servlet1</servlet-name>

</filter-mapping>

<filter-mapping>

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

<servlet-name>Servlet2</servlet-name>

</filter-mapping>

<filter-mapping>

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

<url-pattern>/Filter1</url-pattern>

</filter-mapping>

<filter-mapping>

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

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

</filter-mapping>

Options already tried:

1) Coding only servlet mapping.

2) Coding only url-pattern mapping for *.jsp

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

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...

[1710 byte] By [fundoo.codea] at [2007-11-26 17:57:24]
# 1
Wrong forum, mate.See http://forum.java.sun.com/ann.jspa?annID=14Have a look at forums for Web Tier APIsSee http://forum.java.sun.com/category.jspa?categoryID=20
stefan.schulza at 2007-7-9 5:10:37 > top of Java-index,Core,Core APIs...