ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Two Servlet Filters Every Web Application Should Have
Subject:   MIME types and Servlets that generate binary data
Date:   2004-01-07 18:52:12
From:   jfalkner
Response to: MIME types and Servlets that generate binary data

Sure, you could solve this problem a few ways. One way is to cache based on URL parameters (which I think this filter does...) and simply put the information you care about in the URL.

Another way would be to add another level of abstraction to the cache filter, e.g. allow cache-control objects to be registered to the filter, then have the filter both check the URL/headers/etc and the registered cache-control objects. It would then be up to you to code cache-control objects (say one for your calendar) and register them with the filter.