How to remove the Pragma and Cache-Control No-cache header from the responses in JBoss EAP

Solution Verified - Updated -

Issue

  • I would like to change the expiration time and cache for all gif and java script.
  • After adding parameters to Apache to control caching the following headers are still seen in the http response:

    Pragma: No-cache
    

    and/or

    Cache-Control: no-cache        
    
  • Is there any configurable setting in Tomcat/JBoss?

  • We are running SSL to JBoss and trying to download a PDF file. By default it seems Tomcat turns off caching with secure content. It also seems the PDF viewier uses the cache to spool the pdf. We need a way to turn off the no cache in the header
  • We configured a security-constraint on our application web.xml and Pragma/Cache-Control headers are now being set automatically. Can this be disabled?

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.