Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sessions in Struts 1.3

 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Struts 1.3, i want to know is there any method which will tell me
how may session attributes i have maintained in my whole application.
I have used


In many times in my code now i want to remove all those session at the time of Log off

how can i?
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how may session attributes i have maintained in my whole application

You can get the names of all session attributes in a particular session using HttpSession.getAttributeNames() method.
In many times in my code now i want to remove all those session at the time of Log off

Do you want to remove all the sessions or session attributes?? Generally when a user logs off, the session is ended using HttpSession.invalidate(), this removes all the attributes from the session and kills the session itself...
 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply......
but for enterprise log in i don't want to invalidate session.
i will remove unnecessary session
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand why you wouldn't just invalidate the session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic