我如何在Glassfish服务器中设置HTTP标头 [英] How can I set HTTP headers in Glassfish server
问题描述
我想在我的Glassfish服务器提供Javascript和图像文件等静态资源时设置ExpiresHTTP响应标头。 (因为强制浏览器缓存它们)
我如何在Glassfish V 3.0.1服务器中执行此操作?
您是否从安全页面引用资源?那么Jigar Joshi的答案就是
http://blogs.oracle.com/cwebster/entry/caching_static_resources_in_glassfish
无效......
如果你有安全页面,那么以下内容将帮助你。
静态资源不被缓存引用来自glassfish-secure-page / 5482987#5482987>静态资源没有从Glassfish安全页面引用缓存I want to set the "Expires" HTTP response header when my Glassfish server serves static resources like Javascript and image files. (because to force the browser to cache them)
How can I do this in Glassfish V 3.0.1 server?
Are you referencing resources from secure page?? Then The answer of Jigar Joshi i.e.
http://blogs.oracle.com/cwebster/entry/caching_static_resources_in_glassfish
will not work...
If you are having secure page then following will help you out.
Static resources are not cached referenced from glassfish secure page
这篇关于我如何在Glassfish服务器中设置HTTP标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!