Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JET Guide
Previous Page Home Next Page

JET Syntax Reference

JET has the following directives

  • @jet - affects Java code created by the JET compiler.
  • @taglib - imports a tag library into the template for use, and assigns it a unique namespace prefix.

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:

  • @include
  • @start
  • @end

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

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire