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]

Reply via email to