On Fri, Mar 12, 1999 at 06:50:10AM -0800, Bruno Lowagie wrote:
> I have a servlet that starts a long series of calculations.
> The calculations can take up to 30 minutes.
>
> This leads to 2 problems:
> 1. The timeout of the server is less than 30 minutes,
> so we get a 'document contains no data'.
> 2. We don't want to raise the timeout, because a user
> won't usually wait that long.
>
> We thought of the following solution:
> 1. The user calls a servlet.
> 2. This servlets starts a process in background that calculates
> a result and writes it to a file on the server.
> 3. The user gets an immediate response with the URL of this file,
> so he can visit this URL once the calculations are finished.
>
> What is the best way to do this? A servlet calling another servlet?
> Starting a thread (but won't this thread be killed once the servlet
> has sent his response)?
I don't think this is a very user friendly approach. When should the
user check back? How does the user tell if the file is done?
Most like you want an async process which means that your process has
to signal something when it's done. You could have a servlet generate
a page with current status of the job (automatically resyncing every
minute):
file status
--------------
xyxz 12%
a1 100%
You could also write a simple applet which would be called upon
completion.
Finally, there's email.
/Allan
--
Allan M. Wind mailto:[EMAIL PROTECTED]
Manager Information Systems phone: 781.359.9791 (general)
Integration Associates, Inc. phone: 781.273.0195 ext. 205 (direct)
55 Cambridge Street, Suite 301 fax: 781.359.9789
Burlington, MA 01803 http://www.sap-help.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