1

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?"

Community
  • 1
  • 1
Jitesh
  • 1,384
  • 10
  • 20

1 Answers1

2

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" />
Jitesh
  • 1,384
  • 10
  • 20
  • I've got a glassfish-web.xml, not a sun-web.xml and I don't see where this property would go. Googling around suggests I need to add a context.xml file to the META-INF directory of my war file... – Ryan Oct 16 '14 at 18:36
  • Actually above answer was given when I was using JSF 1.2 and Glassfish 2.x. But just post a new question for your situation with the Glassfish version. – Jitesh Nov 17 '14 at 06:10