Hi, I have a Java application running on a Tomcat server (last version of the 5.5 serie). Java version is 6. I have a servlet inside this application who returns json to the browser (if you do not know json it is just a text). This process it taking a very long time, something like 10 seconds. I put some simple debug code inside my servlet to show how much time the servlet takes to process it. The time is short like 0.5 seconds. Still to the browser it takes 10 seconds ! If I type the servlet url on the browser I can see it returns the result fast (the json shows on the browser screen after 0.5 seconds). But it do not release the http connection to the server. It keeps the message 'receiving data from ...' on the botton of the browser for almost 10 seconds. There are not a big load on the server at the moment of this tests. In fact it is only me.
The resumed servlet code is something like this : response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", -1); response.setHeader("Cache-Control","no-store"); response.setDateHeader ("Expires", 0); response.setContentType("text/html"); String s = ... // creates JSON String PrintWriter w = response.getWriter(); w.write(s); As you can see very standard I think. I have the no cache headers because the json is generated at every time and can not be cahed. Someone has any idea of what the problem is ? Danilo. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]