maybe check out "JSTP", http://jstp.sourceforge.net/manual.html
its syntax is subset of JSP, therefore IDE support is excellent.
a "jstp" template is translated into a plain java class at build time. there is no runtime dependency.
"parameters" to a template should be passed by member fields. static typing all the way.
Bar.jstp
<%!
public String name;
%>
Hello <%= name %>
build converts it into Bar.java
public class Bar
{
public String name;
public void render(java.io.PrintWriter out)
{
out.print("Hello ");
out.print(String.valueOf(name));
...
}
}
and you invoke the template by
Bar bar = new Bar();
bar.name = "John";
bar.render(..);
with typical "hotswap" you shouldn't have to restart serve when editing the template.