|
This topic has
9
replies
on
1
page.
|
|
|
|
|
|
|
|
|
how to let tomcat destroy a session???
|
|
Saish
Posts:6,785
Registered: 2/23/00
|
|
|
|
|
Out of the box, I believe Tomcat allows you to specify the session timeout. Put the following in your web.xml.
<web-app>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
...
</web-app>
The value is in minutes. After that interval (roughly), the user's session will be invalidated.
- Saish
|
|
serlank
Posts:951
Registered: 6/7/01
|
|
|
|
|
... or if you would like to do it programmaticaly you can call invalidate() on the session object.
|
|
|
|
|
|
|
|
Since Tomcat 5.5 this seems not to work any more ...
|
|
|
|
|
|
|
|
Since Tomcat 5.5 this seems not to work any more ...
You mean session.invalidate() doesnot work or the web.xml configuration doesnot work in tomcat 5.5
sNkr
|
|
totalz
Posts:38
Registered: 8/4/05
|
|
|
|
|
Since Tomcat 5.5 this seems not to work any more ...
You mean session.invalidate() doesnot work or the web.xml configuration doesnot work in tomcat 5.5
sNkr
I'm testing with Tomcat6, it seems session.invalidate() does not work!!
|
|
BalusC
Posts:29,784
Registered: 4/26/06
|
|
|
|
|
It works perfectly. Your interpretation is just wrong.
In the future please respond to active topics only and don't resurrect old topics.
|
|
totalz
Posts:38
Registered: 8/4/05
|
|
|
|
|
It works perfectly. Your interpretation is just wrong.
In the future please respond to active topics only and don't resurrect old topics.
Please tell how my interpretation is wrong.
If you don't people to reply to old threads, please lock them.
And if you want to help, I'm actually waiting for your reply on Session invalidate() in Tomcat 6.
|
|
cowboy
Posts:9
Registered: 7/3/08
|
|
|
|
|
i'm using this:
HttpSession htpSess=request.getSession();
if(htpSess!=null){
htpSess.invalidate();
Enumeration e= htpSess.getAttributeNames();
while(e.hasMoreElements()){
String key=(String)e.nextElement();
htpSess.setAttribute(key,null);
}
}
|
|
BalusC
Posts:29,784
Registered: 4/26/06
|
|
|
|
|
Just HttpSession#invalidate() is enough.
No need to resurrect this thread for.
|
|
|
This topic has
9
replies
on
1
page.
|
|
Back to Forum
Read the Developer Forums Code of Conduct
Email this Topic
Edit this Topic
|
|
Site Upgrade
Forums 7.1.8 was deployed Oct 26th. The release consists of minor fixes & a few enhancements.
|
|
Forums Statistics
Users Online : 29 - Guests : 132
About Sun forums
-
Sun Forums is a large collection of user generated
discussions. It is here to help you ask questions, find answers, and
participate in discussions.
Check out our guide on Getting
started with Sun Forums for a full walkthrough of how to best
leverage the benefits of this community.
|
|