Any way to check the client abruptly close the connection?

2007-07-08 Thread aaime74
Hi, I'm fighting a relatively nasty issue. I've implemented a WMS service (Web Map Server), which basically returns a geographic map in response to a request stating which data to use, which area to display, which style to apply to the map, and so on. The main trouble is that building the map

Re: Any way to check the client abruptly close the connection?

2007-07-09 Thread aaime74
Johnny Kewl wrote: This is an interesting question, and I'm going to guess... If you in a JSP page, I dont think the error can be trapped. If you in a servlet, yes I think a try catch will detect it, but only if you actually write something. Which I can't do. The WMS is an

How to check if the client dropped the connection

2009-09-28 Thread aaime74
Hi, I'm working on the development of an open source application, GeoServer, implementing the Web Map Service specification. The specification allows a client to request maps using simple GET requests like:

Re: How to check if the client dropped the connection

2009-09-28 Thread aaime74
jasonb wrote: Hi Andrea. When the client disconnects, and your servlet tries to write to the output stream, Tomcat will throw a ClientAbortException (you may have already seen this): http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/ClientAbortException.html

Re: How to check if the client dropped the connection

2009-09-28 Thread aaime74
Markus Meyer wrote: Jason Brittain schrieb: The first time you call flush, it will send the HTTP response headers to the client, so you would need to first set the headers before flushing. That sounds difficult for you to do because you're writing an image, and one of the headers would

Re: How to check if the client dropped the connection

2009-09-29 Thread aaime74
awarnier wrote: aaime74 wrote: ... Hi. Kind of restarting from the beginning, I think that the first question to ask is whether whatever method which actually does the rendering of the maps, and which is heavy in terms of resources, is capable of being interrupted cleanly

Re: How to check if the client dropped the connection

2009-09-29 Thread aaime74
Markus Meyer wrote: I'm not saying you should store the whole map all at once. My approach was to dynamically cache requests that the client may want to make in advance. An easy example would be if a client makes a request for the city center, you create the map for the city center plus