----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


----- Original Message -----
From: Mart Käsper <[EMAIL PROTECTED]>
To: Java Apache Users <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2000 11:52 AM
Subject: PrintWriter.checkError() ?
>
> Hi,

Hi Mart,


>
> as far as I can see, my servlet cannot detect whether or not the client
> has closed down its connection - I thought I would be able to do this
> by checking PrintWriter.checkError() (the PrintWriter that I got from
> the incoming Response object). It always returns false.
>
> Otherwise the servlet will keep processing requests that no one is
> longer
> interested in, thereby making it harder for newly arrived requests
> to be processed (keeping databases busy etc).
>
> I have searched the FAQ, earlier mailing list archives etc etc but
> no clues ... help, please

I have heared at the servlet-interest mailing list that if you call the

response.getOutputStream() method (instead of response.getWriter())
and write the output to it; this will throw an
IOException if the request is no longer there ( i.e. the user closed the
browser
or pressed the Stop button).
(I haven't try  this myself so i am not 100% sure about this)





> My environment is :
>
> * RedHat 6.0
> * Apache 1.3.6
> * JServ 1.0
> * JDK 1.1.7 v3 (Blackdown)
> * JSDK 2.0

I think everybody of this list would say: upgrade Jserv




>
> I am using SingleThreadModel, btw.


Why? I have never used SingleThreadModel and i am very happy without it.
I would suggest to leave it out and try to find those sections of your
programs
(servlets) that should be syncronised.





>
> Thanks in advance
>
> /Mart
>

Best wishes,

                Andras.





--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to