hi, 
It works.
Thank you so much.

stan

----- Original Message ----- 
From: "STOCKHOLM, Raymond" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 6:16 PM
Subject: RE: Can servlet generate a Web page first, then continue to run ?


> 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
> 

Reply via email to