0 Replies Latest reply on Sep 20, 2002 7:56 PM by Pete Clearwater

    Jetty: forward to JSP using namedDispatcher

    Pete Clearwater Newbie

      Hi.

      I'm trying to port a very large app from Weblogic to Jboss/Jetty. Most of our front end consists of Servlet controllers which forward on to JSP for display using a NamedDispatcher. Unfortunately, this doesn't work when using Jetty/Jboss as I always end up with a 404 page not found error. If I forward using a RequestDispatcher then everthing works fine. I've double/triple checked my spelling and it all looks good. Any ideas?

      web.xml:

      <servlet-name>addressmain.jsp</servlet-name>
      <jsp-file>/ubcjsp/addrinfo/JSPAddressMain.jsp</jsp-file>


      servlet:
      // JSP_ADDRESSMAIN_URL = addressmain.jsp
      cat.debug("Forwarding to " + JSP_ADDRESSMAIN_URL);
      rd = getServletContext().getNamedDispatcher(JSP_ADDRESSMAIN_URL);
      rd.forward(req, res);

      log output (DEBUG):
      DEBUG [SRVAddressInfo] Forwarding to addressmain.jsp
      INFO [Jetty] addressmain.jsp: init

      if I change this to the actual JSP the output is like:
      DEBUG [SRVAddressInfo] Forwarding to /jsp/addrinfo/JSPAddressMain.jsp
      INFO [Jetty] JSP: init
      INFO [STDOUT] Inside JSPAddressMain.jsp...

      Thanks for any help. I've posted this to the Jetty group as well.

      pete