When user logs into HTTP servlet, the login activity takes 3 minutes
(accesses a database, etc.).  Unfortunately, the browser times out at 2
minutes.  My Web app server doesn't support response streaming
(PrintWriter.flush has no effect), and I'm not sure if that would prevent
the timeout anyway.

I'm considering the following.  Any easier alternatives?

- Servlet recognizes it will take awhile to process request
- Servlet returns HTML with "Please wait..." page with "<meta
http-equiv=\"Refresh\"content=\"60\">"  to cause browser to ask again in 60
seconds.
- Before doGet completes, servlet kicks off lengthy processing on another
thread.  Call it dbAccess thread.
- doGet completes
- Processing continues on dbAccess thread.
- 60 seconds later, browser sends refresh request - same URL, same parms
- Servlet associates with original request and issues Object.wait until the
dbAccess thread issues Object.notifyAll.
- Servlet returns page
- Both threads (doGet and dbAccess) are now done.

___________________________________________________________________________
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