>Gregory Polimis wrote:
>>
>> Question: Can I implement a "blocking" method on the servlet so it can
>> wait for an indeterminate period before calling a method to write
>> the results to the web-client?
>>
Christopher K St John replied
>
> As you noted, the problem isn't the servlet (which will
>quite happily block for a very long time) but the client.
>Off the top of my head:
>
> 1) If you have control over the deployment environment,
>   you might consider using an applet. Applets can be
>   a major pain to deploy, though. (There are more kinds
>   of web browsers than are dreamed of in your philosophy)
>
> 2) Have the servlet return a preliminary result that has
>   a refresh tag. Details in the archives, try searching
>   on "meta refresh".[1] Note that this one isn't guaranteed
>   to work across every browser, but chances are it will
>   work on the ones you care about.
>
> #2 is probably the one you want.
>
I am going to need to do something similair soon - but option 2 will not
work, since the time involved at the application server level is database
access time and therefore, will not return until the data extract is
complete. In addition, what I would like is for the client to be able to
submit the query, my application would respond with some sort of "working"
indicator and the client would be free to wander around the rest of the site
until the data was ready, at which point I would like to be able to be able
to pop up a message over whatever page the client was viewing. Obviously, if
the client leaves the site then all bets are off. I think I might be able to
achieve this by opening a second browser window when the query is submitted,
I was wondering if there is a more elegant solution.

Regards
Roger



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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

Reply via email to