I'm running JBoss 4.2.2 and have a filter in the ROOT.war WEB-INF/web.xml of the jboss-web.deployer. For some reason though when I request a page like http://host.domain.name/, the default servlet tacks on the index.html (which is a valid file and is one of the entries in the welcome file list of the web.xml) prior to my filter running. My filter is basically like the following:
<filter> <filter-name>RewriteFilter</filter-name> <filter-class>my.class.RewriteFilter</filter-class> </filter> <filter-mapping> <filter-name>RewriteFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
<servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>