File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in Maintaining Seesion.

 
Suchen Chodankar
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am developing a small web app.
Now to maintain the session of the user I have followed the following steps and I would like to know whether I am right in doing this.

1. when user logs in to the system I fetch user information from the database and set it to the UserInfo object( called userInfo. UserInfo stores the information about any user.

2. Now I set this UserInfo object to the session attribute called userInfo as shown below.:


3. Now everytime the request comes from that particular user I make sure that the session is not new and the session attribute "userInfo" as mentioned in step 2 exists in that particular session.

Now my questions are:
Is this the correct way to manage sessions in the real applications?
Is there anything else I need to do to make sure session does it's work properly?


Thanks in advance.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
3. Now everytime the request comes from that particular user I make sure that the session is not new and the session attribute "userInfo" as mentioned in step 2 exists in that particular session.


Are you using filters ?
 
Suchen Chodankar
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no I have not used any filters.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic