Static resources are not cached referenced from glassfish secure page

与世无争的帅哥 提交于 2019-12-20 04:32:09

问题


I'm using JSF 1.2 and glassfish declarative security with j_security_check..

My xhtml page is in secure_pages folder and i secure all the resources in it by setting security constrant with web resources constraint as "/secure_pages/*"...

My javascripts and CSS are in another (non-secure) folder,which are referenced from the xhtml....

I've made resources cacheable according instruction given by link...

http://blogs.oracle.com/cwebster/entry/caching_static_resources_in_glassfish

Also in one of the discussion of stack overflow

Enable cache of J2EE web application's resources

it written as,it works, but not for security-enabled resources, where Glassfish sets the Expires header on its own.

So my question is "How can i set cache on this static resources?"


回答1:


Ok i got answer of my question after bit googling....

Just need to write the following property in sun-web.xml

  <property name="securePagesWithPragma" value="false" />


来源:https://stackoverflow.com/questions/5468099/static-resources-are-not-cached-referenced-from-glassfish-secure-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!