[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: SessionObjects



Rajeev, please send such questions to the list.

On Wed, 05 Jul 2000, Rajeev Pillai wrote:
> Yes we need to store HTTP session object inside Ozone.
> We are trying to store the session object with
> sessionID (a string) as the key and all the user info.
> 
> as the Session Object.
>     
> We are using SessionObjects as we did not want to
> send all user related info. through the URL string.
> Therefore for  each user there is a Session Object
> created which has a unique SessionID which is now
> being
> passed on the URL string. Now, we want to get the same
> user info. using the SessionID from the 
> URL string. 
Hmmm.. probably I lost something and I'm by no means an Servlet expert but as
far as I understand the Servlet engine does the session handling for you. So,
something like:

	HttpSession session = request.getSession(true);
        OzoneStoredUserInfo uinfo = session.getValue("sessiontest.userInfo")

should work. It gets the HTTPSession out of the HTTPRequest and the associated
UserInfo out of the session. Since the UserInfo is a database object the
sessions holds just a proxy for it.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de