2 Replies Latest reply on Jun 29, 2004 6:51 PM by monocongo

    Redirect from Apache to JBoss losing request/session info

    monocongo

      In apache/conf/httpd.conf I am doing a RedirectPermanent to a URL on another machine, and I think I am losing some session or request information when the request is forwarded to the redirect URL. I am redirecting to a servlet which is running on a JBoss server on a remote machine, and in the servlet I am unable to access the user's login ID via HttpServletRequest.getRemoteUser(). Is it possible that some information is lost when the Redirect is made ?

      Does this have something to do with there being one user session on the Apache server and a completely different session on JBoss server ?

      Thanks in advance for any insight.


      -James

        • 1. Re: Redirect from Apache to JBoss losing request/session inf
          anil.saldhana

          As far as I remember, redirecting always creates new sessions and forwards retains the session/request info. Can't u use mod_jk as a connect b/w Apache and Jboss/Tomcat?

          • 2. Re: Redirect from Apache to JBoss losing request/session inf
            monocongo

            Thanks for the suggestion.

            This was remedied by putting all of the servlets, and not just the first one which did an initial authentication, into the <web-resource-collection> of the web.xml of the JBoss web application. The remote user information is now available to all of the servlets which need it (as long as they are in the <web-resource-collection>). It seems that the request's Principal gets passed around only to those servlets which are designated as protected in the web.xml.