JSP (page direction) problem.
Posted on 2002-03-12
First, my set-up is.. weblogic, ejb backend, jsp front end, with a servlet brokering requests.
My problem is that I need to execute some serverside work, as a result of a POST request, that can take up to 2 hours to complete (legacy system). Therefore the browser times out b4 it's completed......
In "pseudocode" what I (the servlet) need to do is...
* recieve and handle POST request
* display a re-freshing "please wait" page/jsp to avoid
the browser timing out the request.
* execute the work that can take hours.
* redirect to "finished" page & display details.
The main difficultly is that you seem to be only able to call HttpServletResponse::sendRedirect() *once*, it says so in the docs.
So I call it once to display the "please wait" page, but then can't call it again to show the "finished" page.
But also, weblogic seems to ignore my request to display the "please wait" page until *after* the 2-hour long method executes! I've tried flushing the buffers but it doesn't help.
any suggestions greatly appreciated!