[Opensource] How to use PersistentSesssion

Jefferson Magno jefferson at boavistanet.com.br
Tue Apr 1 03:12:11 PST 2003


Mike, my browser does support cookies, but I really need to have
persistent sessions without them. Do you know which are the steps?

Thks

Jefferson

Em Seg, 2003-03-31 às 14:56, Mike Traum escreveu:
> It does sound like you are getting a new session for each request. Does your
> browser support (and have enabled) cookies? Sessions generally use cookies
> and extra steps are required to support sessions without cookies.
> 
> mike
> 
> -----Original Message-----
> From: Jefferson Magno [mailto:jefferson at boavistanet.com.br]
> Sent: Friday, March 28, 2003 12:54 PM
> To: Lista Expresso
> Subject: [Opensource] How to use PersistentSesssion
> 
> 
> Hello all,
> 
> I need to save an object into the session context to use it across
> multiple states in a controller. I tried the following:
> 
> In the first state:
> 
> PersistentSession session = request.getSession();
> session.setPersistentAttribute( "name1", obj1 );
> 
> In other states:
> 
> PersistentSession session = request.getSession();
> Object obj1 = session.getPersistentAttribute( "name1" );
> 
> but it didn't work, the obj1 came null.
> 
> I made another test: I wrote in both states:
> System.out.println( "Session: " + session );
> and, for my surprise, the Strings representing the session objects were
> different. What's happening? Is each state using a different session
> object?
> 
> 
> Thks a lot.
> 
> Jefferson Magno
> 
> 
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
> 





More information about the Opensource mailing list