Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

AW: How to logout

SH Solutions

2003-12-10

Replies:

Hi

> <input type="submit" name="id0" value="Logout"
onclick="session.invalidate();response.sendError(response.SC_UNAUTHORIZED,
'Logged out');" >

You are mixing Java and JavaScript here.
Since session.invalidate() might even exist in some browsers javascript,
response.sendError surely wont.
Send the logout request to your server and do the invalidate and sendError
there from your servlet. That should work.

cu
Steffen


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.