[Opensource] How to use PersistentSesssion
larry hamel
expresso at codeguild.com
Tue Apr 1 14:50:24 PST 2003
see this thread
http://www.jcorporate.com/eforum/Browse.do?state=browseMessages&ThreadId=1165&GroupId=1
At 03:12 AM 4/1/2003, you wrote:
>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/
>>
>
>
>_______________________________________________
>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