tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kirk <peter_k...@alpha-gruppen.dk>
Subject RE: Session
Date Tue, 06 May 2003 10:56:05 GMT
Hi, thanks for the answer,

> Are you calling getSession(true) or getSession(false) ?
> 
> Should be using getSession(false) for all servlets except 
> entry points 
> into your app.

I call request.getSession().
This should determine itself whether or not it needs to create a session,
shouldn't it?

The thing I don't understand is why it works if I run it locally, but not if
I run it on another machine over a network.

Peter


> >If I run my servlet on a Tomcat on my "localhost" then my 
> session-tracking
> >works as I exepect - that is, I can set and get attributes 
> across several
> >requests.
> >
> >But If I run my servlet on a Tomcat on another machine over 
> a network, then
> >the session-tracking does not do as I expect - if I put an 
> object, then I
> >cannot get it on the next request. (Actually, a new Session object is
> >generated for each request).
> >
> >Does anyone have a suggestion as to what the difference could be?

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message