I am trying to setup a filter for my servlet.

my configuration in web.xml looks like this:
<!-- The Filter for all servlets -->
<filter>
     <filter-name>URLBuilder</filter-name>
     <filter-class>com.merck.web.util.RequestURLFilter</filter-class>
     <init-param>
        <param-name>audittrial</param-name>
        <param-value>off</param-value>
     </init-param>
</filter>

<filter-mapping>
    <filter-name>URLBuilder</filter-name>
    <url-pattern>/site/*</url-pattern>
</filter-mapping>
 

my web.xml dtd definitions are :
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

I was getting filter is not recognized. So I changed to 2.3 as follows:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

Now I get this message:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

Don't know why suddenly my error page has some issues by adding filter. Becuase before I added filter everything worked without any problems.

Any help will be greatly appreciated.

Thanks
Madhav