4 Replies Latest reply on Oct 25, 2002 7:49 AM by Greg Wilkins

    Jetty HttpServletRequest.getServletPath() problem

    Eric Anderson Newbie

      I recently moved a servlet .war file from Tomcat 4.0.1 to JBoss 3.0.2/Jetty. This caused the application to break, mainly because HttpServletRequest.getServletPath() seems to be returning the wrong information.

      When I invoke my servlet with the URL http://localhost:8080/pending/servlet/pending/login on the two platforms, I get the following from the HttpServletRequest object

      Tomcat 4:
      ContextPath: /pending
      PathInfo: /login
      QueryString: null
      RequestURI: /pending/servlet/pending/login
      ServletPath: /servlet/pending

      JBoss/Jetty:
      ContextPath: /pending
      PathInfo: /pending/login
      QueryString: null
      RequestURI: /pending/servlet/pending/login
      ServletPath: /servlet

      Judging by the Servlets 2.3 APIdocs, it seems to me like Jetty has a bug with getPathInfo() and getServletPath(), and that Tomcat has it right. Is this a known issue with Jetty?
      -Eric