Instead of forcing the browser to query the server for changes of static resources (gif, jpg, png, css, js, ...) on every request, let's add an expires date in the HTTP response for such requests to reduce server load and improve site performance.
With this comes the need to institute a "resource update policy" to serve as a way to inform clients that any given resource has changed and thus needs to be re-fetched. The way it was decided to do this would be to not apply the expires header for the time it takes to expire thus forcing subsequent requests to re-fetch the resource.
Given these requirements, I have come up with the following tasks:
1) Create a javax.servlet.Filter to handle the task of adding the expires header to
http response.
2) Create a configuration property, say 'http.exipres.duration' that represents the desired amount of time a client browser shall cache a static resource. A value of -1 would indicate that an expires header *not* be applied. The created filter would access this config property and write to the http header accordingly.
3) Apply the filter to: *.gif, *.jpg, *.png, *.css, *.js type resources.
4) The filter should honor a potentially already existing expires header and NOT overwrite it.
5) It would be preferable the config property, detailed above, be modifiable at runtime w/OUT having to stop/start the server. This would allow the site admin(s) to easily initiate a resource update to clients.