JSP vs Velocity what is better?

@Vartec:
I don’t think that the “strict separation of view from business logic” is a velocity feature that is not present in jsp. You can do business logic in jsp (more or less) but it’s not recommended at all. But I agree in your point regarding the syntax.

Performance

JSP is compiled to Java, so I don’t think that velocity is faster. (have not done benchmarks myself)

Ease of use

For designers: velocity
For programmers: (IMHO) jsp, because it’s closer to code

Ease of creating reusable components

JSP has lots of components
Velocity has no components itself (not component oriented)

Availability of open source 3rd parties

I have seen far more projects using JSP or JSP related technologies than velocity. Maybe because velocity is really low level… 🙂

IDE support

There are plenty of tools for jsp. Especially the eclipse jboss plugin/tool suite has a good jsp editor.

Plugins for Velocity are mostly not functional or pretty basic (you get lucky if you have syntax highlighting)

Update
If you are looking for a templating engine now, I’d suggest to have a look at thymeleaf. It’s comparably lightweight to velocity and can be used just to template some text based templates with a few lines of code or used as a full featured templating engine for example within a webapp.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)