If you explicitely close your writer (the outputstream) in your servlet, the client
will receive your page,
and your servlet will be able to continue to work :
protected void processRequest(HttpServletRequest request, HttpServletResponse
response)
throws ServletException , IOException {
PrintWriter out = response.getWriter();
out.println("Page to display to client");
out.close();
// Do some work in your servlet...
}
-----Message d'origine-----
DeÂ: lixiaoquan [mailto:[EMAIL PROTECTED]
EnvoyÃÂ: mercredi 5 mai 2004 12:02
ÃÂ: [EMAIL PROTECTED]
ObjetÂ: Can servlet generate a Web page first, then continue to run ?
hi,
I want to show a page immediately after the visiters' Form Submitting ,then do some
logical processing at backgroud(this will assume a long time, so it may bother the
visitor). I surpose to do these in one servlet.
How can I do this?
Thanks
stan