I've got an intermediate amount of experience programming in Java and a fairly advanced amount of experience programming web applications in other languages. I'm currently in the process of learning some of the Java web frameworks (Spring MVC, Struts.)
Where I work, we have a number of individual Java web applications, deployed in separate contexts and as separate wars. A few of the oldest are servlets, many are Struts 1, and the new ones will be Spring 3.
Most of the existing applications have inconsistent or no branding (graphics/decoration), and one of the things I am looking into is applying a consistent header and footer across multiple sites that we can maintain in one place. Ideally it wouldn't even have to be on the same server as the web applications. To be clear-- whereever I configure my template, I want to be able to configure http://some.other.server/template instead of WEB-INF/template.
I would like to use SiteMesh or something with the same "decorating" approach but I researched it, and apparently the only way this has been done in SiteMesh 2 was done by someone who forked the code and customized it to allow remote templates to be imported. (I found this information on the Sitemesh3 Google group.)
I'm at the beginning of designing this solution so I suppose we could use anything like Velocity, Freemarker, Tiles. However, where I work we are slow to update old apps and conservative in adopting new technologies, so I have to prove a solution has good community support, works with Struts 1 and Spring 3 MVC, and is fairly trustworthy and stable.
Velocity has a concept of "resource loader", i.e. an interface for finding template files which can be configured. There is already a loader for URL-based resources. See the Velocity Documentation for Resource Loaders. It also has basic support for caching.
If you need something a bit more sophisticated it should also be fairly easy to provide your own implementation of a resource loader, I did that for one of my projects and it works fine.