This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
What I was thinking is that as far as I know, Tomcat doesn't cache anything (which is its major disadvantage and the reason people use it with apache, which I also hate - 2x bugs). Also, I was thinking, that my browser has cache enabled, and so do most other browsers. So, why in the first place have server handle cahing, when the client can do it?
So, I wrote this little filter, which seems to work perfectly, already saving my server Gigs of bandwidths.
Let me know what you think, and if people seem to like it, maybe it's a good idea to ask Tomcat administration to ship this server with Tomcat?
Basically, here's the filter itself:
Here's the mapping that you should have in your web.xml:
And here is the /WEB-INF/Cache.properties:
So, what you think? [ June 29, 2004: Message edited by: Ivan Jouikov ]