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).
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.
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 https://foo.bar.org/sm/MyApp, and the images are at https://foo.bar.org/img)?