Question 2: Long Tasks
Someone has probably asked this one before, but I could not find an 
answer (see question 4). Occasionally, I perform a long operation on the 
app server. If I wait around for the response, the HTML page returns 
"timeout" or "client reset by peer" messages. What is the Webware-ish 
approach to solving this problem?
    

I believe you'll be okay if you give the client a little something, like
you start sending them the page.  You can do that, I believe, like:

self.response().write(' ')
self.response().flush()

Some adapters cache the output before they send it.
So you may need to send more data
self.response().write(' ' * 1024)
self.response().flush()
This cause hours of grief when I developed on FreeBSD and deployed on IIS

Search the list, I am also a fan of sending back an HTML page w/ a meta-refresh tag.
If you spawn the task into another thread you can pass the session ID.  When the thread finishes you can change some setting in the users session.
Then on the servlet that is being refreshed just check for this session param each time,


Reply via email to