views:

154

answers:

0

I am using Resin 3.2. According to the documentation I should be able to tell Resin to cache items of my choosing by inserting the following into the resin-web.xml within the webapp element.

Here is what is in the resin-web.xml:

<web-app xmlns="http://caucho.com/ns/resin"&gt;
<cache-mapping url-pattern='/layout/*' expires='1D'/>
<cache-mapping url-pattern='*.gif' expires='1D'/>
<cache-mapping url-pattern='*.jpg' expires='1D'/>
<cache-mapping url-pattern='*.js' expires='1D'/>
<cache-mapping url-pattern='*.css' expires='1D'/>
<cache-mapping url-pattern='*.png' expires='1D'/>
</web-app>

Layout is the folder where the css and js files live. The file structure looks like:

layout/images
layout/js
layout/css

When loading a request from the server, of the 7 sub requests (images, css, js) that get sent from the client to the server only the jsp has an expiration set. All the other items (css, gif, jpg, js) do not have any expiration data set within the HTTP message. I observed this behavior using Firebug and Http Live Headers in firefox.

What gives? Where do I enable the settings in Resin for http header cache expiration?