Enable cache of J2EE web application's resources
How can I control my web application's resource handling?
I have users with extremely high latency times (~1s!) and I must test my application in such开发者_JS百科 environments. What I can see right away is that my resources (css and image files) are always reloaded on every page, probably because the response header contains an Expire tag that does not allow for any browser caching.
How can I tell the ?resoure adapter? to set it to some reasonable value? Are there any other ways to improve bad latency effects?
Environment: Glassfish v3, JSF2 and Primefaces.
I found this:
http://code.google.com/p/xebia-france/wiki/ExpiresFilter
it works, but not for security-enabled resources, where Glassfish sets the Expires header on its own.
This is another useful bit of information (the "Using Security Constraints..." section):
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/ImageBundle.html
I will rephrase my question concerning Glassfish and resources.
Thanks for your interest in ExpiresFilter Gabor, please note that ExpiresFilter has been integrated in Tomcat 7.0.2 ( http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Expires_Filter ).
Cyrille (Xebia)
精彩评论