[GLASSFISH-12493] The headers "Pragma: no-cache" and "Cache-control: no-cache" are inserted to HTTP response automatically. Created: 05/Jul/10  Updated: 07/Feb/12  Resolved: 06/Jul/10

Status: Resolved
Project: glassfish
Component/s: web_container
Affects Version/s: v2.1.1
Fix Version/s: 3.1

Type: Bug Priority: Critical
Reporter: pjanouskovec Assignee: Amy Roh
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Attachments: XML File context.xml     XML File domain.xml    
Issuezilla Id: 12,493


The headers "Pragma: no-cache" and "Cache-control: no-cache" are inserted to
HTTP response automatically.
How is possible change the behaviour (disable automatic inserting the headers)?
I know, that Tomcat make it possible via context.xml:
For example:
<Valve className="org.apache.catalina.authenticator.FormAuthenticator"
disableProxyCaching="false" ></Valve>

Unfortunatelly, I'm not found the equivalent configuration for Glassfish.

Comment by Tom Mueller [ 06/Jul/10 ]

This appears to be a web container issue.

Comment by Shing Wai Chan [ 06/Jul/10 ]

We do support context.xml in GlassFish.
One can achieve the behavior desscribed above by putting the context.xml in
META-INF of the war file.

Comment by janouskovec [ 05/Feb/12 ]

Same problem in 3.1.2 b17. In GF 2.1.1 worked "context.xml" workaround, but in GF 3.1.2 the context.xml is ignored. "Pragma: no-cache" and "Cache-control: no-cache" headers are inserted to HTTP response, although context.xml file exists in META-INF directory.

Comment by Amy Roh [ 07/Feb/12 ]

Do you have virtual-server setCacheControl property in the domain.xml? Can you attach your domain.xml and the war with META-INF/context.xml?

Comment by janouskovec [ 07/Feb/12 ]

Please see attachment.

Generated at Fri Sep 04 05:11:14 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.