JSP, JSF and template based rendering for components

J

Javaholic

We are working on a web project and so far have decided to go with JSP
for web pages and JSF as a component framework ...

Now, we all agree that rendering HTML thru Java code is ugly and I
have been looking at a few template technologies - FreeMarker,
Velocity, etc. - to generate HTML for the custom components that we
develop ...

I was a little confused with whether I can use FreeMarker/Velocity as
template rendering tools for my custom components and still continue
to use the JSP + JSF solution?

Also, I'd like to gather a sense of which template technologies would
best serve my purpose -- given that I am not looking for entire page
templates but templates for rendering reusable components on the page.

Thanks!
 
J

Jonathan Revusky

We are working on a web project and so far have decided to go with JSP
for web pages and JSF as a component framework ...

Now, we all agree that rendering HTML thru Java code is ugly and I
have been looking at a few template technologies - FreeMarker,
Velocity, etc. - to generate HTML for the custom components that we
develop ...

I was a little confused with whether I can use FreeMarker/Velocity as
template rendering tools for my custom components and still continue
to use the JSP + JSF solution?

You can use JSP taglibs from a FreeMarker template. Velocity does not
have this capability.

Also, I'd like to gather a sense of which template technologies would
best serve my purpose -- given that I am not looking for entire page
templates but templates for rendering reusable components on the page.


In general, FreeMarker has much more powerful macro capabilities than
Velocity. In any case, FreeMarker is being actively developed while
Velocity is not really. You might find this page useful:

http://freemarker.org/fmVsVel.html

Though, note that it is not a completely objective source of
information. (Nor am I. :)

Regards,

Jonathan Revusky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top