Hans Bergsten wrote:

>   "Returns the last time the client sent a request carrying the
>   identifier assigned to the session, or -1 if the session is new."

It's kind of like when it *is* Friday and you say "last Friday" which
one are you referring to?  :-)

> To me this means it has to be reset every time the engine receives a
> request that includes the session ID; the current request is the "last
> time" a request for the session was received.
>
> Maybe I'm missing something here, so please correct me if I'm wrong.
> To return the time for the previous request (n-1) the engine must have
> "look back" feature, i.e. remember when the previous request was
> received and set the last accessed time to this value when it
> receives the current request. That sounds a bit convoluted to me.

The implementation has to a bit convoluted (involving two vars), but
n-1 is the only thing that's useful, and it's the way JSDK 2.1 is
implemented.  When the spec's unclear we should go with the JSDK
reference impl.

BTW, if the server returned the time at which you *just* called
getSession() then the -1 wouldn't make much sense.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.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

Reply via email to