----- Original Message -----
From: "Funkaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>


> Ok... this is what I have:
>
> if (! theRequest.isRequestedSessionIdValid() ) {
>     try {
>        theResponse.sendError(theResponse.SC_UNAUTHORIZED);
>        return;
>     } catch (IOException e) {
>        return;
>     }
> }
>

[snipped..]
> How can I check if a session has been invalidated?

Try this code

// notice that false will not create a new session id if a valid session is
not attached with the request.
HttpSession ses = theRequest.getSession(false);
if(ses == null)
{
    // no valid session..
}
else
{
    // valid session...
}


Regds,
Gokul

> Mike

___________________________________________________________________________
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

Reply via email to