File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Session Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Session" Watch "Session" New topic
Author

Session

p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92
If we close the browser,when the specific user session is
active.Again if we open browse how to retrive it same
user.
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

If you want the user's session to remain active on the server, then set the maxInactiveInterval of the session to a high value and set the age of the JSESSIONID cookie to a high value (default age of JSESSIONID cookie is -1 i.e. till the browser is closed). But this might create a load on the server memory.

If you don't want to waste the memory of your server, then you can let the user's session die after a specific interval of time. Create a custom cookie on the client side to identify the client next time automatically and then create a new session for the client. This is how most sites allow user's session to be active for weeks...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Session
 
Similar Threads
Http Session and App Specific Session
Invalidation of an existing session
time out
create a new session when valid session is already existing?
session.invalidate()