About Templates Tags Driver Download

An example template

Contents of examples/template.tpl file:

<?? ISO-8859-2 ?>
<html>
<head>
        <title><?= getVariable("name") ?></title>
</head>
</html>
<?!
/// do stuff
import org.tito.templator.*;
import java.util.*;
?>
<?@
private int evaluate() {
   return 1;
}
?>
<body>
<?
       out.write("<p>Hello</p>\n");
?>
<p>evaluate: <?= evaluate() ?></p>
<p>Comment: <?= getVariable("comment") ?></p>
</body>
<end>

Processing

Templator produces Template_tpl.java file. This file is then compiled. Any compile errors will be written to standard error stream. Make sure all symbos used inside templator tags are defined.

See tag info for correct use.

Driving output generation

To actually produce any output you will need a 'driver'. See driver info.