NOTE: TldBuilder is still under heavy development, and are _NOT_ ready for use yet!

Introduction

TldBuilder is a java tool providing automatic building of taglib descriptor files (.tld) from annotations within your taglib classes. At the moment this is done through a provided Maven 2 plugin. But the builder itself can easily be implemented into any java based system. An Ant plugin will be made available shortly.

TldBuilder creates tld files based on the 'JavaServer Pages 1.2 Tag Library' specification published by Sun. (http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd ). In the future TldBuilder will also support version 2.0 and 2.1. We still use 1.2 in some projects, and therefore this was implemented first. Please send a mail to the project mailing list if you need support for these newer versions. The plan is to make support for converting your tld files between these versions as well.

Example :

...
public class DemoTag {

    @TaglibTag(shortName = "mytag", description = "My tag")
    public DemoTag() {
    }

    @TaglibAttribute(name = "name", rtexprvalue = true)
    public void setName() {
    }

    @TaglibAttribute
    public void setEncoding() {
    }
}
...

See Usage page for complete examples on how to use TldBuilder in your projects. Take a look at the FAQ for frequently asked questions.

Resources