|
Home > Archive > EAserver > March 2005 > Re: how to catch ioexception when i close ie browser and easerver
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: how to catch ioexception when i close ie browser and easerver
|
|
| Dave Wolf 2005-03-30, 7:08 pm |
| Welcome to the web. This is the way it works. You cant design systems
assuming the client will always receive all bytes sent to them. Realize
the client is only connected for the duration it takes to marshall the
bytes. There is no good way to detect disconnection.
Dave Wolf
Cynergy Systems
http://www.cynergysystems.com
james wrote:
> During servlet is processing the http request in
> EAServer(use ie call a servlet in easerver),if client
> disconnect to the server(when the servlet in easerver is
> processing doget method,i close ie browser window),servlet
> doesn't throw IO Exception(in ServletOutputStream out =
> response.getOutputStream();
> for(i = 0; i < 10000; i++)
> {
> try
> {
> out.println("println line" + i);
> }
> catch(IOException e)
> {
> System.out.println("exception ::::::" + e);
> return;
> }
> System.out.println("println line" + i);
> }
>
> )
> how can i do that if i want to catch IOException?
| |
| Dave Wolf 2005-03-30, 7:08 pm |
| Because there is nothing in the J2EE spec which requires the container
to do so. Every container is different and you should not depend on
this functionality.
Dave Wolf
Cynergy Systems
http://www.cynergysystems.com
> it was so surprised to me,for if i use tomcat4.13,i can
> catch ioexception in server when i colse ie ,why easerver
> can't do that?
|
|
|
|
|