jQuery in Action, 2nd edition*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Template?" Watch "Template?" New topic
Author

Template?

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.
A.htm
------
<table><tr><td>MYWORD</td></tr></table>
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 :
<table>
<tr>
<td>
<c: out value="MyOtherWords"/>
</td>
</tr>
</table>
Correct me if i am wrong
daniel
[ 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: http://aspose.com/file-tools
 
subject: Template?
 
Similar Threads
Dynamic message
Templates -> Tiles Problem
JSP Processing Error
Struts templates
display errors