Setting an alternate url mapping for a servlet from a tomcat10 context

10 views Asked by At

I have configured a system with apache2 with the mod-jk to access tomcat10 contexts that are configured in the 000-default.conf as:

JkMount /app/* ajp13_worker

In this context, I have a servlet that looks like this:

@WebServlet(name = "File", urlPatterns = {"*.bin","*.html","*.css","*.js"})
public class File extends HttpServlet {
...
}

that creates mapping for url's like http://localhost/app/page1.html, http://localhost/app/page2.html, http://localhost/app/page3.html, etc. (there is other servlets here, that create mappings for others urls).

I wish that the servlet above also could create url mappings for http://localhost/page1.html, http://localhost/page2.html, http://localhost/page3.html, etc. If this not affect the other servlets, could be nice, but it is not required.

0

There are 0 answers