http headers in tomcat - how to set Expires and/or Cache-Control

2,087 views
Skip to first unread message

newbie

unread,
Mar 3, 2008, 12:46:58 PM3/3/08
to Google Web Toolkit
Hi, although this should probably go to the tomcat mailing list, I'm
posting here in case other GWT users have similar questions. GWT
generates a lot of *.cache.* files. I'm running tomcat as stand-
alone, so I've been looking for something like mod_headers that would
allow me to set Expires or Cache-Control headers for the *.cache.*
files. I was very surprised to find zero info about how to do this on
the web, in tomcat FAQs, and even in tomcat books.
The only thing I found was this page
http://wiki.apache.org/tomcat/FAQ/Connectors
which talks about connecting tomcat with apache and says:
"mod_headers, mod_rewrite, and mod_alias could be written for Tomcat,
but why reinvent the wheel when Apache has done it so well?"

Is there really no way to set http headers for static content in
tomcat short of writing a custom servlet?!

Thanks
-Ben

Alex Epshteyn

unread,
Mar 27, 2008, 9:59:50 PM3/27/08
to Google Web Toolkit
I've been using the urlrewrite filter for tomcat from http://tuckey.org/

In profiling my app, I found this filter to take a huge share of the
CPU time. In trying to solve my performance issues, I just started
searching for a native Tomcat solution, and am very surprised by the
lack of info on this.

Does anyone have a good way of setting the cache headers that they
could share?


On Mar 3, 10:46 am, newbie <weisb...@gmail.com> wrote:
> Hi, although this should probably go to the tomcat mailing list, I'm
> posting here in case other GWT users have similar questions. GWT
> generates a lot of *.cache.* files. I'm running tomcat as stand-
> alone, so I've been looking for something like mod_headers that would
> allow me to set Expires or Cache-Control headers for the *.cache.*
> files. I was very surprised to find zero info about how to do this on
> the web, in tomcat FAQs, and even in tomcat books.
> The only thing I found was this pagehttp://wiki.apache.org/tomcat/FAQ/Connectors

davidroe

unread,
Mar 28, 2008, 12:52:12 AM3/28/08
to Google Web Toolkit
This article has some information which may be of help:

http://www.infoq.com/articles/gwt-high-ajax

/dave

On Mar 27, 6:59 pm, Alex Epshteyn <alexander.epsht...@gmail.com>
wrote:
> I've been using the urlrewrite filter for tomcat fromhttp://tuckey.org/
Reply all
Reply to author
Forward
0 new messages