Frequently Asked Questions

This document attempts to answer some of the more frequently asked questions regarding various aspects of Jelly. These questions are typically asked over and over again on the mailing lists, as a courtesy to the developers, we ask that you read this document before posting to the mailing lists.

General

  1. What is Jelly?
  2. Why is this called Jelly?

Using Jelly

  1. How do I add my own tag libraries to Jelly?

Building Jelly

  1. How do I build Jelly?

General

What is Jelly?
Jelly is an open and customizable XML processing engine. Please see the Home page and Overview documents for more detail.
Why is this called Jelly?
The name started out as 'Jele' as in Java ELEments but then I thought Jelly was a nicer spelling :-). The basic idea behind Jelly that Java code is bound on to XML elements.
Also Jelly (in British or Jello in American) can be molded to fit any shape required which kinda fits with Jelly's main aim to be a flexible Java and XML based scripting engine that can do anything.
There are many different specific frameworks that take an XML document, bind it to some kind of bean or object and then evaluate it in some kind of script or process, so Jelly was an attempt at a generic engine using ideas from JSP, JSTL, Velocity, Cocoon and Ant.

Using Jelly

How do I add my own tag libraries to Jelly?
Firstly you need to create one or more tags, by deriving from TagSupport. Then create a TagLibrary class for your tags; typically all this does is register all the tags in your tag library and give them names. Then you can use your new tag library by specifying the classname in a namespace URI. For example
<j:jelly xmlns:j="jelly:core" xmlns:foo="jelly:com.acme.something.MyTagLibrary">

  <foo:bar x="12>
	something goes here
  </foo:bar>

</j:jelly>
Going forward we hope to provide an alias mechanism using the jar-extension mechanism used by JAXP so that a file could be placed on the classpath called META-INF/services/org.apache.commons.jelly.foo which would contain the class name of the tag library (com.acme.something.MyTagLibrary) then you could use it as follows, which would avoid using the class name in your scripts.
<j:jelly xmlns:j="jelly:core" xmlns:foo="jelly:foo">

  <foo:bar x="12>
	something goes here
  </foo:bar>

</j:jelly>

Building Jelly

How do I build Jelly?
Jelly uses Maven for its build system. So you should be able to build Jelly just like any other Maven enabled project. Please see the Maven documentation for details.