Sure. Create your logout button. Include some javascript on your html page, so that
"onClick" on
that button, you set "choice" to "EndSession" and then submit the form. Email me
privately if you
need more help.
Joan
> x-MEL: melsud.res.ray.com <M.E.L Raytheon Systems Company>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
> Importance: Normal
> Date: Wed, 23 Feb 2000 12:04:24 -0600
> From: "blueads.com" <[EMAIL PROTECTED]>
> Subject: Killing a session
> To: [EMAIL PROTECTED]
>
> I would like to kill a servlet session (logout) from a servlet generated
> html page using a submit button. Can I put the code (shown below)
> in the same servlet that generated the html page and call it again
> to kill the session using a submit button? If so, how?
>
> Sincerely,
>
> Tom K.
>
> else if(choice.equals("EndSession")){
> try{
> session.invalidate();
> response.sendRedirect(request.getScheme() + "://" +
> request.getServerName() +
>":" +
request.getServerPort() +
> "/login.html");
> return;
> }
> catch(IllegalStateException e) {
> System.out.println("Exception " + e);
> }
> }
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html