>>> Mike Whittaker <[EMAIL PROTECTED]> 08-May-01 9:04:05 PM >>>

>I'm writing a servlet that interacts with an applet.
>The applet will access the servlet twice during the
>session. (poss not quite correct use of word session)
>I want the servlet to be able to determine if any client
>using the applet is between these two accesses.

Right,


>So I suppose the instances of the servlet need to
>communicate with each other?

Seems reasonable. I'd say what you should do is create a session on
the first access and store some marker in the session on the second
access.

The code can then establish whether the session contains your marker
to work out whether the request is within range.

Another way to do it would be to return a cookie on the first
response. With most scenarios this would be exactly the same as the
session.


>I'm not familiar with threads yet (then get familiar eh!) does
>this need to be a SingleThreadModel?

No. Absolutely not. NEVER use SingleThreadModel. Go back through the
archives to establish why not (this has been discussed many, many
times).


>My OOD isn't too hot either!

Keep at it and it'll get better.


Nic

___________________________________________________________________________
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