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


Grady Jamyson
Ranch Hand

Joined: Aug 04, 2002
Posts: 42
Is there any Template engine for jsp?
For example, I use Frontpage create A.htm.
And now, I want to write a jsp that could replace "MYWORD" in A.htm.
But I don't know how to do. Is there any tool or class could do this?
Thanks a lot!!
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
I think you can modify that page using JSTL like this :
<c: out value="MyOtherWords"/>
Correct me if i am wrong
[ April 01, 2003: Message edited by: Fisher Daniel ]
Andy Bowes
Ranch Hand

Joined: Jan 14, 2003
Posts: 171
There are lots of template engines out there for JSPs. Just go to Apache Jakarta and have a look at Velocity or Struts.
I am not sure how complex your requirements actaully are but I tend to use use Struts Tiles to define page layouts for my web-sites. I find it pretty intuitive to use and there are plenty of examples.

Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
I agree. Here's the link:
subject: Template?
It's not a secret anymore!