1. This is a shortcoming of Servlet specification. There's no simple way to
check if the session is valid without resorting to calling one of
HttpSession's methods that throw IllegalStateException if the session is no
longer valid. You can do this
try {
session.getMaxInactiveInterval();
}
catch (IllegalStateException) {
// session is no longer valid
}
or
register a listener with the session and have it modify a state table
(hashtable, database table, etc) based on the session id. When the session
is invalidated, an entry with a particular session id in the state table is
marked as invalid. All clients that require information about a particular
session based on the id will need to do a lookup in the state table.
2. Use your favorite encoding. Base64 is a good choice.
3. You have no control over browser's cache. Instead, use proper HTTP header
values and application logic to deal with caching.
>From: Daison Jose <[EMAIL PROTECTED]>
>Subject: check whether session is active or not.
>Date: Tue, 31 Aug 1999 20:03:20 +0530
>
>Hi all,
>
>1) I am havig some problem with session Id.I am having all the session id
>of all users who have logged in.I want to check
>using session id whether that session is alive or not.
>
>eg sessid.isalive() something like.
>
>
>2) Can U tell me how to encrypt the URL from the client when a request
>comes
>
> eg /servlet/firstservlet/?name="dais"&value="pawd"
>
>I dont want the user to see this infn .How to do it.
>
>3) Is there any way to clear the cache from any browser.
>
>Thanks in advance
>Daison
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
___________________________________________________________________________
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