Re: HTML table API
Erik Hatcher <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <[email protected]> |
Sorry, I didn't mean to reply about Velocity off-list (darn those
lists that said Reply-To sender)...
The primary differences between Velocity and JSP is that Velocity is
not tied to a servlet container and templates don't have to be built
into a WAR structure. Velocity is a standalone templating library, so
you can use it in any Java app, to say, template e-mails*.
Erik
* http://today.java.net/pub/a/today/2003/12/16/velocity.html
On Mar 20, 2009, at 1:20 PM, Richard O. Hammer wrote:
> One respondent suggested Velocity (see below).
>
> From the example given it looks to me like Velocity is used much the
> same way as JSP is used. I am already familiar with JSP. Is
> Velocity better than JSP for some reason?
>
> Thanks,
> Rich Hammer
>
> One (who responded to only me and who may prefer anonymity) wrote:
>> How about Velocity?
>> <table>
>> #foreach($obj in $objects)
>> <tr>
>> <td>$obj.property</td>
>> </tr>
>> #end
>> </table>
>> I much prefer a templating approach to HTML generation than a
>> programmatic one. Seeing out.writeln('<div>') in JavaScript smells
>> bad to me, for example - same would go for Java.