----- Original Message -----
From: Mike Engelhart <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 17, 1999 11:42 AM
Subject: Re: Long process (Rewrite)


> Correct me if I'm wrong, but this sounds like a complete and utter hack.
I
> realize there are lots of different "methods" to do what I was asking, but
I
> really wanted something more defined (maybe in the JSP/Servlet specs) than
> writing a separate JSP to sniff around a session waiting for some value
that
> may never get there due to any number of outside factors in the original
> servlet.

So you don't consider HTML a complete and utter hack, eh?  Hehe, sorry man,
in HTML, anything's fair game.

To put it simply, HTTP just doesn't support what you want to do.  As people
suggested, there is server-side push, but support for that is pretty flaky
due to firewalls, proxies and so on.

>From a purely abstract point of view you have two options:  an interrupt or
a polling loop.  Because of the limitations of HTTP, you can't do an
interrupt, so the only other option is a polling loop, which is exactly what
was suggested to set.

To answer your question about having the bean never show up, you could
implement a timeout in Servlet
B, just put a Date object into the session that marks the beginning of
processing.

BTW, the session is the proper place to put things, there's nothing wrong
with that.   In this instance the client is making two specific, different
kinds of requests.  The first is the request to begin the processing
(Servlet A).  The second is the repeated requests to see if the processing
is done yet (Servlet B).  These are two different servlets, and the only
sound way to pass data between two servlets is the session context.

FYI, if you don't like the Bean to stick in the session, you can remove it
after you're through with it, which is probably required anyway for this
process to be repeatable.

cheers,

-tg

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
For JSP FAQ, http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to