I do not know any developers that have created more than a couple web applications in Java/J2EE and have not gotten frustrated by JSP. JSP lacks - on all fronts! JSP is created to decouple presentation from the program code but nobody except a programmer can handle JSP!!! It is presentation for ... programmers. Who wants it? It is ugly and limitted. Just to name a few: a custom tag can not be an attribute of another tag (invalid XML and JSP), you can not easily load JSP from a JAR/Classpath, JSPs need to be compiled, it is too verbose and designers HATE it, is not friendly to any WYSIWYG HTML editors.
Being frustrated, I was, naturally, looking to alternatives. First I looked at Tapestry. As far as templating goes - it is nice, and smart. But it is a full-blown MVC framework too. General rule - more functionality tools try to take on them, more limitting they are, because they enforce their "best practices" and that may not be the best way always. Also, my current application is, already, written in Struts and moving to or integrating with Tapestry, while possible, is going to be time-costly and highly unpleasant exercise.
Going around and around, I finally, decided to take a deeper look at the Jakarta Velocity. After all - I have heard too much of it and two tools I use all the time - Confluence and Jira, both use Velocity - so WTH?
Well, to put it short: writing templates with JSP and Velocity is like writing your persistence with raw JDBC or using Hibernate. YES! That's the kind of difference! Just like Hibernate, Velocity brings a huuuge simplification, is highly extensible, flexible and leaves you space to using alternatives, if you will so. Last but not least - it does integrate with Struts, too.
I am very, very happy. I think my journey, in search for a good templating engine has come to an end and I found it - Velocity is the way to go!
I can not, possibly, write here in more detail about a reach engine like Velocity, but it's not necessary, either. There's a wonderful, brilliant book about Velocity written by Rob Harrop - Pro jakarta Velocity.This book is how I learnt Velocity and there is nothing I could add it. Wonderful book that I, personally, highly recommend.
P.S. Velocity is more than a template engine. First, it is not just for Web templating, can be used in any medium, second - it can be used as a transformation and/or rule engine. That aspect has, already, been mentioned on the TSS, just recently, by the way.