Yes, route all requests through a certain servlet where u set appropriate header fields with standard java HttpServletRequest API, e.g. setHeader(name, value). You can do it for static resources (.html,.
js,.gif..) also by registering a servlet for "/" path in your webapp. The Tomcat servlet doing that (static res serve) for all webapps by default is StandardServlet which u have to extend to make your own header logic in doGet and/or doPost and afterwards forward to tomcat;s code by calling super.doGet..helps u out a bit?
Of course in jsp, if not included in the response of another jsp/servlet u have to do setHeader and equivalent there.
-------------
Nicu Marasoiu
java programmer