When I put a webapp in /webapps/mycontext and have a web.xml specify a
servlet that responds to "/":
<servlet-name>myservlet</servlet-name>
<url-pattern>/</url-pattern>
HttpServletRequest.getPathInfo() returns the correct part of the URL:
http://foo.com/mycontext/blah
.getPathInfo() -> "/blah"
When I mount the servlet programmatically, though, getPathInfo() returns
null.
ServletContextHandler s = new ServletContextHandler();
s.setContextPath("/mycontext");
s.addServlet(MyServlet.class, "/");
.getPathInfo() -> null
Is there a way that I can get the part of the URL after /mycontext
consistently, regardless of whether my servlet is mounted in web.xml or
programmatically?
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users