0 Replies Latest reply on Sep 25, 2008 7:47 PM by John Bailo

    Sharing Session Data Between War Files

    John Bailo Master

      I need to do the following:

      From a servlet in one one.WAR, establish a session variable on another two.WAR and then redirect to a page in two.WAR that reads the session variable.

      It seems like a session var created in one.WAR does not carry over to two.WAR.

      I also tried posting data using HttpURLConnection to a .jsp in two.WAR, setting up a session variable and then doing sendRedirect. But the session var doesn't exist.

      I also tried retrieving the value of JSESSIONID from the Post above, and setting it as a cookie for the Path of the two.WAR. But again, the value of the session variable in two.WAR was null.

      From a servlet, how can I send set up a session variable in a different .WAR and then transfer my user to a page in that .WAR which can then access that same session variable?