About Templates Tags Driver Download

Templator tags

Templator understands following tags:

<?? ENCODING ?>
This tag specifies the character encoding of the template. Output produced will be of this same encoding.
Example:
    <?? ISO-8859-2 ?>
  
<?! JAVA ?>
Java code will be inserted before the template class definition. This is normally used to define extra imports.
Example:
    <?!
        import java.util.*;
        import org.problem.*;
    ?>
  
<?@ METHOD ?>
You can add additional methods to template class.
Example:
    <?@
        private int evaluate(int a, int b) {
                return a+b;
        }
    ?>
  
<? JAVA ?>
Anything inside this tag will be treated as Java source code and will be inserted as is.
Example:
    <?
        for (Evaluation e=((Vector)getVariable("friends")).elements();
                e.hasMoreElements(); ) {
            String name=(String)e.nextElement();
    ?>
    <p><?= name ?></p>
    <?
        }
    ?>
  
<?= EXPR ?>
Expression will be evaluated and printed to output during runtime. Make sure all symbols used in EXPR are defined.
Example:
    <p><?= name ?></p>