Sorry, you're quite right it does remain on the server, I'm just being silly. The session.setAttribute() works because the server is remembering the session by the JSESSIONID which is now in the URL of the request rather than in a cookie header being sent by the request.


-Mike Fowler "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it"


Ben Bookey wrote:
Hi Mike

Thanks for the reply.  I think I have missed something here. I believe if we
store an object in the session
its still stored on the server, but is specific to the active user-session.
I cant imagine any java objects been sent across the network to the client
... In addition,  i am suprised that storing objects in the session object
works, when the client has sessions switched off hence app.setAttribute() ??

Help !!!


regards,

Ben

----- Original Message -----
From: "Mike Fowler" <[EMAIL PROTECTED]>
To: "Ben Bookey" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 5:41 PM
Subject: Re: How to handle client session information if client has sessions
disabled?



Ben-

Once you encode the URL, the subsequent request to Tomcat will cause
tomcat to pull the JSESSIONID from the URL (in the referer header) so
session.getId() will work just the same as before.

As for your second question, I'd store everything in the session.
Something like:

session.setAttribute("key","value");

This eliminates all serverside processing of the user (save finding the
session ID) and off-loads the memory required to store your objects to
the client.

Hope this helps!

-Mike Fowler
"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"


Ben Bookey wrote:

Thanks for the reply.

O.k so I can store the session userid, which is very useful, for a
stateless exchange between
client and server. Can i still use session.getId() to get the id, or
must I do something special, when the id is stored in
the url ?

Where would you recommend storing all my objects, particular to a user
? inside the application object,  something like ?

application.setAttribute(userid & myObject ,myObject);

I would really appreciate your help....

regards

Ben



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to