You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anurag Kapur <an...@gmail.com> on 2010/03/16 16:19:28 UTC
Setting HTTP Response Headers Through Tomcat Configurations
Hello,
I wanted to poll this group to know if there are any settings/configurations
in Tomcat (version 5.5.27) that can set default HTTP response headers, fir
example Cache-Control?
I know this can be done through application specific code using
HttpServletResponse<http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletResponse.html>
but if possible I would like to do this though some built in
configurations.
Thank you for your time.
Regards
Anurag
------------------------------------------------------------------
Anurag Kapur
Associate - Technology,
Sapient Corporation.
http://www.linkedin.com/in/anuragkapur
http://www.google.com/profiles/anuragkapur
------------------------------------------------------------------
Re: Setting HTTP Response Headers Through Tomcat Configurations
Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/3/16 Anurag Kapur <an...@gmail.com>:
> I wanted to poll this group to know if there are any settings/configurations
> in Tomcat (version 5.5.27) that can set default HTTP response headers, fir
> example Cache-Control?
There is none.
You can either implement a Filter [1] (inside a web application), see
the Java Servlet specification [2] for details, or a Valve [3] (at any
Tomcat container level).
If you will be using a Filter, I would recommend to look at
UrlRewriteFilter by Paul Tuckey [4].
[1] http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/Filter.html
[2] http://java.sun.com/products/servlet/reference/index.html
[3] http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/Valve.html
[4] http://tuckey.org/urlrewrite/
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org