Login problem in struts

Hi to all,

Iam using struts 1.1, java 1.4.2, mysql 4. for my application.

When user clicks submit in login page, calls action "loginuser.do",

here getting values from "loginForm" and checking in DB and creating

session and storing the login values (email and name,id) in session.

After logout (session.invalidate()), when user came back using back

button and refersh the browser, it is automatically logins to that

user again with creating new session.

It is happens only when refreshing on "loginUser.do" url,

for other ".do" 's in the application, while refreshing redirects to

login page.

I found, when i refreshes the browser at "loginUser.do" it

automatically getting the user previously entered values from

loginForm and logging in again into his account by creating new

session.

I also wrote reset method in loginForm. but no use.I cant find where i

did the mistake.

How the values are coming back into loginForm?

How to rectify this.

Please help me on this issue....

Thanks in Advance

Regards,

Mohan

[1171 byte] By [MohanPaladia] at [2007-11-27 6:48:16]
# 1
u first remove the attributes from the session the give session.invalidate()
Jas_rose_Discussiona at 2007-7-12 18:21:33 > top of Java-index,Java Essentials,Java Programming...
# 2

First of all do a session.invalidate() and put a check for session validity in all the action classes.

HttpSession session = request.getSession(false);

if(session==null || request.getSession().isNew() )

{

System.out.println("SESSION HAS BEEN TIMED OUT OR NEW SESSION +++++++++++++++++++++++++++++++");

}

Hope this helps u !!!!

also there's a META tag which redirects to another url after a certain time..

Chk it out!!!

<meta http-equiv="refresh" content="<%= session.getMaxInactiveInterval() %>;url=error.jsp">

vinayak_ra at 2007-7-12 18:21:33 > top of Java-index,Java Essentials,Java Programming...