Automatic generation of JST templates