This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sessions in Struts 1.3  RSS feed

 
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: 9610
37
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!