I'm converting a Tomcat app to Jetty. I've encounter a difference
that I hope you can help me with. In my code I have:
URL u = config.getServletContext().getResource( "/jsp/test.jsp" )
In Tomcat I get:
/C:/tomcat/webapps/myapp/jsp/test.jsp.jsp
In Jetty I get:
/C:/Temp/Jetty__8080___myapp/webapp/jsp/test.jsp
I'd like Jetty to return:
/C:/Temp/Jetty__8080___myapp/jsp/test.jsp
Or is there a better way, something that works on Tomcat and Jetty,
to get the Root of the app, something that returns:
/C:/Temp/Jetty__8080___myapp
Why do I need this? I read the String "/jsp/test.jsp" as a
servlet "init-param". I later redirect:
URL u = config.getServletContext().getResource( "/jsp/test.jsp" )
response.sendRedirect( u );
Jetty's computed path is different to Tomcat.
P.S. GregW, thanks for answering my WELCOME-FILE-LIST question. Any
chance of making your "redirectWelcome initParam" setting the
default? Think of all the support questions you'd miss...