File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Template Engine exist like this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Template Engine exist like this?" Watch "Template Engine exist like this?" New topic
Author

Template Engine exist like this?

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Here is how I would like to see a templating engine work with JSP or Velocity or whatever. Maybe someone can tell me if one exists or not.
Say I have a servlet that get's a bunch of crap from a database. And then with the information I do something like the following:
Template t = new Template();
t.setParameter("name", "Gregg");
t.display("page.jsp")
And then on the JSP (or whatever) page I have:
<TD>Name: {$name}</TD>
Now, I realize we can do this with JavaBeans and the useBean tag library, but notice the difference in the code. Personally, I think this approach looks a lot cleaner than the taglib approach.
Anyone know of anything like this?
[ September 15, 2003: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Template Engine exist like this?