Re: HTML table API

"Richard O. Hammer" <rhammer-KKlG/[email protected]>
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
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.
> 


> On Mar 18, 2009, at 8:21 PM, Richard O. Hammer wrote:
> 
>> I am starting to write a class to represent an HTML table being 
>> generated in my Java code.  Surely this has been done many times 
>> before.  But I guess I'm not Googling right.
>>
>> I want to create an HTML table (a String of HTML output) in my Java 
>> code.  Can someone recommend an API that does this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.