You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Wolff <al...@gmail.com> on 2007/05/24 21:27:27 UTC

How to configure cache-control in Tomcat

I would like to set in a Web-app that all static resources (images, css,
js..) are cached in browser by 10 minutes
(including in the HTTP Header response something like this: "Cache-Control:
max-age=600)

some idea how to configure cache-control in Tomcat?

thanks in advance,
Alexander

Re: How to configure cache-control in Tomcat

Posted by Gregor Schneider <rc...@googlemail.com>.
you can't controle the headers in tomcat (and this is where you
specify things as cache-control in http-protocol).

either your web-app has to modify the http-response-header, our you
can write a filter. a filter is specified by the
servlet-specification, thus tomcat supports ist.

more info on filters:

http://java.sun.com/products/servlet/Filters.html

cheers

gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org