JET Syntax Reference

JET has the following directives

JET recognizes the following "Classic" JET directives, but does not yet implement them. An error message is issued if any of the following directives are recognized:

To emit the characters <%@ in a templates output, enter <\%@. To emit %>, enter %\>

The @jet directive

The @jet directive controls the name of the generated Java class, its containing package and the Java classes it imports.

All attributes are optional.The following tag summarizes the available attributes.

Attribute Usage
package Name of package into which the template will be compiled. May be used only once per template.
class Name of Java class to be generated. May be used only once per template.
imports A space separated list of Java import locations.
startTag A two character replacement for <% in subsequent JET elements.
endTag A two character replacement for %> in subsequent JET elements.

The @taglib directive

The @taglib directive imports an XML tag library, or renames the taglibrary namespace prefix. Example:

<%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%>

The value for prefix must be value XML NCName, namely, it must start with letter or underscore (_), and then contain letters, digits or the characters underscore (_), hyphen (-) or dot (.).

The id for the Standard JET tag libaries are:

Tag Library ID
Control Tags org.eclipse.jet.controlTags
Workspace Tags org.eclipse.jet.workspaceTags
Java Tags org.eclipse.jet.javaTags
Format Tags org.eclipse.jet.formatTags