Recently, I posted seeking advice for a browser timing out because a
client's initial request to the servlet could take more than 2 minutes.
Responses to the posting included:
- Used database connection pooling because 2+ minutes is too long.
That doesn't help me because the servlet is logging into a legacy
program (not a database) that can take up to 3 minutes.
- Configure Web server or app server to prevent browser timeout.
Setting Timeout value higher in Apache (actually IBM HTTP Server)'s
httpd.conf doesn't solve the problem:
WebSphere App Server 2.02 doesn't have a timeout value
Is this a browser issue as to how long browser wants to wait for a response?
I cannot find a timeout parm in WebSphere.
Any suggestions other than sending a meta refresh to the browser and having
the refresh request wait for the spawned thread from the first request to
finish?
On Tue, 22 Jun 1999, David Sanders wrote:
> 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