HttpSession is not implicit in JavaScript.  You would need to trigger
session.invalidate() from the JSP, in which HttpSession IS implicit.  Try
something like this (quick and dirty):

at the top of the <body> tag of your form page:

<%
  String logout = (String)request.getAttribute("logout");
  if ("true".equals(logout)) {
    session.invalidate();
%>
You have been logged out.
<% } else { %>

[now your form stuff goes here]

<a href="[this page again]?logout="true">Click here to logout.</a>

[then right at the end of the body container]

<% } %>

That should do it.  Hopefully I haven't led you too far astray :)  I don't
know if Tomcat-user is the best place for this question, maybe a JSP/Java
forum might make more sense.

Cheers, James

-----Original Message-----
From: Anibal Constante Brito [mailto:[EMAIL PROTECTED]]
Sent: 09 June 2002 02:02
To: Tomcat
Subject: logout?



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

  • logout? Anibal Constante Brito
    • Catherine Shepherd

Reply via email to