donderdag 14 juni 2007

use http gzip compression

Looking for a way to speed up my webapps I found the following article:

http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1

At first I got some nullpointer exceptions using the CacheFilter. Had to change the following line of code:

if (path!= null && path.equals("nocache")) {
chain.doFilter(request, response);
return;
}

into

if (path == null || "nocache".equals(path)) {
chain.doFilter(request, response);
return;
}

This way I avoided having this filter looking for non existing cached files when requesting the root context.

Geen opmerkingen:

Een reactie plaatsen