tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abhishek reddy" <>
Subject problem with sessions
Date Fri, 27 Jun 2008 06:05:44 GMT
hi every one,

i have a jsp page, once the user logged in iam creating a session in
the jsp page.When the user logged out iam invalidating the session.

when two users logged in, and if one user logged out, the other user
session is also getting invalidated.I dont want this to happen i.e.
evethough the first user logged out second can continue his work.

Can any one tell me how to solve this problem?

here is the code..

once the user logged in, he will move to session.jsp page

session.jsp page


    <div align='left'><a href="logout.jsp">Logout</a>    <a
    out.println("Is session new ?"+session.isNew()+"<BR>");
    out.println("session id="+session.getId());

once the user click the logout link, he will be logged out and session
will be invalidated

logout.jsp page


    out.println("Session Invalidated..");

here is the compose page, here iam checking the varaibale set in
session.if it is null iam forwarding back to login page.


    String check=(String)session.getAttribute("check");
    if (check==null)
    	<jsp:forward page="slogin.jsp">	
    	<jsp:param name="memid" value="" />
    	out.println("Session exists proceed to do the work");

the problem comes when i open a new window from an existing window.

i.e. for example , i have opened a new window and typed the login page url.
now i opened another window from an exisitng window using control+N option.
like wise i opened three windows.

So, when i open the windows in this fashion, session created in the
main window will be same in all the windows that opened thru control+N

So, when the user logged out from any one of the windows, session will
be invalidated in all the windows..

tell me how to sort this problem.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message