-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jose,
On 11/16/12 3:38 PM, Jose María Zaragoza wrote: > I need to modify Cache-Control header in some responses ( forcing > them to not be cached ) What is the best way to do it ? > > a) To implement a Valve ( check request context path and if it > match ,to modify response header ) b) To implement a filter c) > Others ( any property in Tomcat's configuration files that I don't > know ) I would avoid writing a Valve unless you must: a Valve will tie you to Tomcat and possibly to a particular version of Tomcat in some cases. I don't believe Tomcat will mutate your Cache-Control headers so you are probably safe using a Filter. I can't really imagine another way to do this besides writing a Filter or Valve (without using a reverse-proxy as Igor suggests). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCoShMACgkQ9CaO5/Lv0PDQlwCgxGbXPVOU65ug+BlGtkHdrUkm UjMAn2wb+lcntQBcp0O4LL3sOWRLxPm8 =Ib7m -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org