DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8100>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8100 Session Tracking and HttpURLConnection Summary: Session Tracking and HttpURLConnection Product: Tomcat 4 Version: 4.0.3 Final Platform: PC OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Servlet & JSP API AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Platform : Windows 2000 ,Tomcat version 4.0.x. Reproducible problem. I am having a problem with Session tracking using tomcat 4.0.x. The scenario is as follows: 1) "Web app A" in "context1" uses a URLconnection WITHIN A SERVLET IN CONTEXT1 to send data to "webapp B" running in a different server/different context ( context 2). 2) Context 2/Web app2 creates some session objects using HttpSession.setAttribute() method. Context 2 servlet sends response back to servlet running in "context1" ( as a response for the HttpURLConnection ) which in turn shows the response in browser. > >3) The browser then sends a GET or POST request, this time directly to the >server running "WebApp B/context2". > >My issue is that after the step 3,everytime a HttpSession.getSession(true) >is returning a new session for the application in Context 2, so I am not able to implement session tracking using the HttpSession class. Cookies are enabled in the browser. I implemented the BindingListener interfaces and the objects being added to "Context 2" session are bound, but not unbound from the session, does it mean that the session actually exists, but the call getSession(true) does not check for the existing session? A session created within the context works fine when servlet control is managed through RequestDispatcher interfaces, but not in the "URLConnection scenario" that I mentioned above. To the client servlet running in "Web App A/Context1", I added the following to the response: "resp.addCookie(new Cookie("JSESSIONID",jsessionid))", where jsessionid was a part of the returned response ( as a hidden form tag") from a servlet in Context 2. When I proceed with my work after step 3 mentioned above, the existing session is retrieved properly in the "Webapp B/Context 2" for TOMCAT 3.2 but not for TOMCAT 4.0.x-tomcat 4.0.x returns a new session everytime. Any replies are welcome -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>