tags:

views:

110

answers:

1

I have a set of jsp's based off a jtpl template. The template (jtpl file) looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%-- tpl:metadata --%>
<%-- jsf:codeBehind language="java" location="/JavaSource/pagecode/my.java" --%>
<%-- /jsf:codeBehind --%>
<%-- /tpl:metadata --%>
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<HTML>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<f:view>
    <HEAD> ...

Without using RAD, how can I change the jtpl (template) and regenerate jsp? I'm looking for a command line solution.

Related question: is the jsp intended to be rendered from the template design-time in the IDE, or runtime on the server?

Update I tracked down the jar jsf-ibm.jar which contains com/ibm/faces/renderkit ... perhaps there's some way to render with this?

A: 

Well, the JTPL templating engine is available to you. You could write a command line app that does what you need it to do.

Colin Gislason
That might work if I was starting from scratch. But I have a stack of fully built complex jsps based on the template.
Jeffrey Knight
I still think you could do it by iterating over all the JSPs and applying the template. I'm not exactly sure how the templates work and don't have one in front of me to check.
Colin Gislason