"Venkitachalam, Sankar" <[EMAIL PROTECTED]> writes:

> Does it not look like a serious problem? Does anybody have a solution to it?
> It happens to me for Tomcat 4.0. May be it is an issue that should be
> addressed to a tomcat discussion group.

It's probably not a Tomcat issue. See my point below:


> >I have a problem with session tracking. 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.putValue() method. Context 2 servlet sends response back to
> >servlet running in "context1" 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, so I am not able to implement session tracking
> >using the HttpSession class. Cookies are enabled in the browser.

That is correct behaviour (probably). The first session is being
created between the servlet and the client in the "context1".

When your browser tries to connect to the "context2" it will get a
new session and attach it to the browser.

"context2" now has at least 2 sessions, one attached to the webapp called
"context1" and one attached to the browser.



Or are you saying that *every* request from the browser to the
servlet results in a new session?


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to