Monday, 15 July 2013

java - Tomcat 7 /WEB-INF/ directory mapping -


I want to map all requests to a specific service, but Tommack does not map me to the / web-nf / directory Having given

My web Xml file.

  & lt; Servlet & gt; & Lt; Servlet-name & gt; TestServlet & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Mypackage.TestServlet & lt; / Servlet-name & gt; & Lt; / Servlet & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; TestServlet & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / * & Lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt;   

Unless you request a page in the WEB-INF / directory (OK 404).

I also tried to mapping the servlet with / web-nf / * and it had no effect.

No, you do not access files directly in the Web-INF You can.

You will be redirected to the html or jsp file inside the WEB-INF folder.

No comments:

Post a Comment