Well, I don't think so. 1. The benchmark tool was taken from this site: http://www.caucho.com/articles/jsp_benchmark.xtp it's written in C and doesn't seem to understand caching. 2. Nothing changed after I added following lines to my servlet response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
Any more ideas? Ilya. David wrote: -------------------------------------------------------------------------------- Perhaps because, in the version without valve, you benchmarking tool use the expected behaviour of browsers when they have an active cache: request 'if-modified-since', to which tomcat will respond a 'not modified'. Rumata a écrit : >Hello. > >I'm trying to make Tomcat server response to some kind of request as >fast as possible. As far as I understood I can stop processing of >request using a valve registered in the Engine pipeline. > >I wrote the following code: >public class testValve extends org.apache.catalina.valves.ValveBase { > public void invoke(Request request, Response response) throws IOException, > ServletException { > if (request.getRequestURI().equals("/testValve/hello_java")) { > response.getOutputStream().print("<html><body>Hello > All!<br>Rumata</body></html>"); > response.sendAcknowledgement(); > response.finishResponse(); > response.flushBuffer(); > return; > } > > getNext().invoke(request, response); > } >} > >and registered this valve in engine section. > >I also wrote a sample servlet with the same output. > >Now I'm trying to benchmark the whole thing and I get strange results: >valve is slower than the servlet! > >Where I am mistaken? > >Thanks, >Ilya. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]