0 Replies Latest reply on Sep 26, 2002 10:31 AM by RogerN

    Tomcat/Jetty and getResource call

    RogerN Newbie

      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:

      In Jetty I get:

      I'd like Jetty to return:

      Or is there a better way, something that works on Tomcat and Jetty,
      to get the Root of the app, something that returns:

      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...