Velocity in Java
Velocity is a very useful template tool. I use it with my mailing list software to prepare the jobfiles based on user input through a GUI. Each of the variables are set through the GUI and then the text jobfile is created using Velocity.
Here are some good links to get going with Velocity:
Java World - Velocity
Apache Jakarta - Velocity