Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Template Engine exist like this?  RSS feed

Ranch Hand
Posts: 15304
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!