Hello,
The application I am building has to connect to a backend system, which can
take quite a while to be completed. To keep the user informed I want to
display a Wait Page while the execution is taking place and once the
transaction has been finalised, a Status Page should be displayed.
In RedirectServlet I do the following:
public void doPost(...) {
Thread thread = new Thread();
thread.start();
response.setContentType("text/html; charset=ISO-8859-4");
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher("/portfolio/wait.jsp");
dispatcher.include(request,response);
//Execute <file://Execute> a time consuming operation
thread.stop();
dispatcher =
getServletContext().getRequestDispatcher("/portfolio/done.jsp");
dispatcher.forward(request,response);
}
The problem with the above setup is that the Servlet Engine (jswdk-1.0)
complains that I cannot do a forward if an OutputStream has been used. I
understand this failure, but can anyone help me to sort out this problem in
an elegant way ?
Regards, Stefan Lecho.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stefan Lecho - Web Application Developer
ICON Medialab, Brussels +32.2.340.32.33
http://www.iconmedialab.com <http://www.iconmedialab.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