This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sessions" Watch "sessions" New topic


sharathchandra sabbani

Joined: Oct 15, 2007
Posts: 13
when ever user logs into the system i want to create a session for the to do this...
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Your web server and/or application server pretty much does this for you. Do you have specific questions or issues?

- Brent
andres matus

Joined: Dec 21, 2007
Posts: 15
you can put a user object in the request session...that way you have the user information all over your app.

use this....
//setting the user information on the session

//reading the user information from the session
UserObject user = (UserObject)request.getSession().getAttribute("UserSession");

Be what ever you whant
I agree. Here's the link:
subject: sessions
It's not a secret anymore!