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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content