title: Setting Glassfish http headers of cacheable resources
body: <p>I couldn't find a way to control how Glassfish (v3) handles HTTP(s) headers it sends whenever I request a resource (image, css...). The problem is that inside a security-enabled web application it forces a 0 expiry date for everything (even images and css), which makes the whole application feel like a slow and buggy piece of junk by forcing the reload of every image (IE is especially sensitive for this).</p>
  
  <p>I could work around this by putting the image resources in another WAR, or even a separate directory on the server, but that would defeat the point of easy (re)deployment of an EAR file. </p>
  
  <p>I also have a requirement that the files MUST come through an HTTPS connection. Does it cause any problems with certificates etc. if the image context path is different from the application context path (eg. the application is at <a href="https://foo.bar.org/sm/MyApp" rel="nofollow noreferrer">https://foo.bar.org/sm/MyApp</a>, and the images are at <a href="https://foo.bar.org/img" rel="nofollow noreferrer">https://foo.bar.org/img</a>)?</p>