Ranveer K Kumar wrote:session is valid while checking from tomcat manager page.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:
Ranveer K Kumar wrote:session is valid while checking from tomcat manager page.
Session can be invalidated by just invoking Session#invalidate() method and what you see in tomcat manager is not always the indication, tomcat may have other session to work upon.
If you really want to see whether the session is no longer there, then just access any variable placed in it. like:
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
David Newton wrote:Sessions are created by JSP access unless you specify the JSP shouldn't create a session.
David Newton wrote:Sessions are created by JSP access unless you specify the JSP shouldn't create a session.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Ranveer K Kumar wrote:
David Newton wrote:Sessions are created by JSP access unless you specify the JSP shouldn't create a session.
Dear sir,
will <%@ page session="false"> on jsp will work.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar
David Newton
of course work, provided you're not accessing/using 'session' variable on that page. :wink:
Ranveer K Kumar wrote:When I tried to do same thing from different browser then it increased to 2 (event after closing the browser).
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Code looks fine to me, but can't tell the exact problem, you need to implement the SessionListner to find out who is creating/destroying the session.
Sagar Rohankar
you need to implement the SessionListner to find out who is creating/destroying the session.
Ranveer K Kumar wrote:
Session Created: 37CD8E435DF99B5DE998A9B7CF28D2EA (but again calling sessionCreated() method when forwarding to the success page by actionForward method of struts.
Now I change return type to null on the action class of the struts from return mapping.findForward(SUCCESS);
and it now not creating session...
It means that when ActionForward forwarding page that time creating session...
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
I love this place!
Sean Clark wrote:Hey,
So when you invalidate the session, do you then redirect to another page? Login page or something?
To my knowledge as soon as you hit any page a session is created on the server (unless you explicitly tell it not to), can I ask why you don't want there to be a session?
Sean
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:For that you'll need to set session="false" in your JSP. Also since those sessions don't have any attributes in them, they won't take too much resources...
David Newton wrote:It's not clear to me why you think having the session around is a big deal--it isn't.
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|