I'm currently building a Spring MVC application. I was looking to use JSP pages with tag libraries for handling the view layer and formatting of the HTML, but I've come across another group in my company that uses Velocity templates for the same purpose.
From what I can see, it seems to me as if there are a lot of similarities between the two approaches:
- Both have easy-to-understand syntax. Makes it easy for non-developers to understand and use, allowing the designers to focus on the HTML/CSS and only having to use directives/tag libraries in the few cases where they need conditionals/dynamic content without having to have a full understanding of Java.
- Simple to see which part of the content is HTML vs which are directives/logic.
- Both are heavily used and well supported.
- Simple to integrate with Spring MVC.
But in comparing the two technologies, I can't see any specific reasons to use one versus the other. I'm having trouble thinking of any cons specific to either Velocity or JSTL.
So my question is, what are the pros and cons of each in your opinion? If you have built a (Spring) MVC app using one or the other, what made you decide on the view layer technology you are using and what (if anything) made you decide against the other?
Update: I've found a similar discussion of this same topic archived on the Spring Framework forum's here, which might be of some interest to anyone making the same decision between JSTL and Velocity as I am.