I want to map all requests to a specific servlet but Tomcat won't let me map the /WEB-INF/ directory.
My web.xml file.
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>mypackage.TestServlet</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
This works fine until you request a page in the /WEB-INF/ directory (gives a 404). Is there any way to map everything, including the /WEB-INF/ directory to a servlet?
I also tried mapping the servlet with /WEB-INF/* and it had no effect.