Thursday, August 14, 2003

Improve performance of tomcat/cocoon
overwrite doGet in servlet


protected void doHead(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,

Receives an HTTP HEAD request from the protected service method and handles the request. The client sends a HEAD request when it wants to see only the headers of a response, such as Content-Type or Content-Length. The HTTP HEAD method counts the output bytes in the response to set the Content-Length header accurately.

If you override this method, you can avoid computing the response body and just set the response headers directly to improve performance. Make sure that the doHead method you write is both safe and idempotent (that is, protects itself from being called multiple times for one HTTP HEAD request).

If the HTTP HEAD request is incorrectly formatted, doHead returns an HTTP "Bad Request" message.

Tuesday, August 12, 2003

Compression and de-compression with Java:

Testing code available at project directory.

Is this an application of spreading activation?

Cocoon/Tomcat silently discards concurrent requests if the request queue is full. This can solved by changing server.xml
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>