Is there a way to define alias for a Servlet context?
If I want that
http://server/a/foo-servlet
andhttp://server/b/foo-servlet
point to the same Servlet (orhttp://server/a/foo.jsp
andhttp://server/b/foo.jsp
for that matter)- calling
HttpServletRequest#getContextPath()
in the foo Servlet (orfoo.jsp
) returns/a
or/b
respectively
my only option seems to be to deploy the web application containing the foo Servlet twice. Correct?
If I define two contexts a
and b
both pointing to the same doc base the container would essentially still deploy two individual applications.