Hi,

Try running your servlet in SingleThreadModel

i.e

public class MyServlet extends HttpServlet implements SingleThreadModel
{

}

Note: I can't say it is the best available solution. But it is one of the
available solutions.

-Venkat

> -----Original Message-----
> From: Zou hua [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 08, 1999 3:19 AM
> To:   [EMAIL PROTECTED]
> Subject:      more threads write to the same result page
>
> Hello all,
>
> I have a servlet that uses Cookies. When I click the "submit" button from
> the HTML page once, it works well. If I click this button more times at a
> very fast speed, then the returned page looks very strange. It seems there
> are more than one datastreams being writen in the same result page.
>
> I have checked my log file. it seems there is only one seesion associated
> with these clicks, of course, this is what I expected.  But more than one
> servlets ( or threads) runs for these click, maybe each click is
> associated
> with one .  Some of them can catch IOException and some of them catch
> NULLPointerException when  they try to write to
> "response.getOutputStream()".
>
> How to solve this problem?
>
> Best Regards
> Zou Hua
>
> __________________________________________________________________________
> _
> 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

___________________________________________________________________________
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

Reply via email to