I have a web application that has 2 filters and a welcome file
configured in the web.xml. The filters work when the url running the
app explicitly contains a page, i.e. http://xxx/webapp/page.jsp. If
the url doesn't contain a page, i.e. http://xxx/webapp/ the filters are
ignored, but the welcome page is found correctly. What am I doing
wrong? Here is my web.xml
<filter>
<filter-name>Filter1</filter-name>
<filter-class>Filter1</filter-class>
</filter>
<filter-mapping>
<filter-name>Filter1</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>Filter2</filter-name>
<filter-class>Filter2</filter-class>
</filter>
<filter-mapping>
<filter-name>Filter2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>page.jsp</welcome-file>
</welcome-file-list>
configured in the web.xml. The filters work when the url running the
app explicitly contains a page, i.e. http://xxx/webapp/page.jsp. If
the url doesn't contain a page, i.e. http://xxx/webapp/ the filters are
ignored, but the welcome page is found correctly. What am I doing
wrong? Here is my web.xml
<filter>
<filter-name>Filter1</filter-name>
<filter-class>Filter1</filter-class>
</filter>
<filter-mapping>
<filter-name>Filter1</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>Filter2</filter-name>
<filter-class>Filter2</filter-class>
</filter>
<filter-mapping>
<filter-name>Filter2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>page.jsp</welcome-file>
</welcome-file-list>