Jakarta Tapestry
Tapestry is a powerful, open-source, all-Java framework for creating leading edge web applications in Java.
Tapestry reconceptualizes web application development in terms of objects, methods and properties instead of URLs and query parameters. It allows you to build sophisticated, richly interactive, highly scalable web applications without any concern for HTTP ... or even the Servlet API! Tapestry takes over all the tedious and error-prone aspects of web application development, letting you focus on just the parts specific to your application.
Tapestry is an alternative to scripting environments such as JavaServer Pages or Velocity. Tapestry goes far further, providing a complete framework for creating extremely dynamic applications with minimal amounts of coding.
Tapestry's approach, using a component object model similar to a traditional GUI, provides the following benefits:
- Very high level of reuse, within and between projects
Everything in Tapestry is a reusable component
- Frees developers from writing boring, buggy code
Code in terms of objects, methods and properties, not URLs and query parameters
- Allows applications' complexity to scale well
Framework does all the URL building and message dispatching, transparently
- Easy Internationalization/Localization
Framework selects localized version of text, templates and images
- Extremely robust applications
Less code is less bugs
Sophisticated built-in exception reporting
Line precise error reporting - Easy team integration
Graphic designers and Java developers can work together without having to know each other's jobs
Tapestry has been developed using the guiding principals of Simplicity, Consistency, Efficiency and Feedback. Tapestry is focused on improving developer productivity; the goal of Tapestry is to ensure that, when developing your applications, the simplest approach is also the correct approach.
Tapestry is distributed under the terms of the Apache Software License. It can be freely used, shared and modified with minimal constraints.
Tapestry 4.0
Tapestry 4.0 is just overflowing with new features aimed at further enhancing your productivity. Here's a few of our favorites:
- The new 4.0 specification DTDs have been simplified.
- The syntax used for binding parameters inside an HTML template and inside an XML specification is now consistent. Both make use of the binding prefixes.
- "Friendly" URLs (that is, URLs that pack more information into the path and less into query parameters) are built in. This makes it easy to divide your application across many folders (reducing clutter), and leverage J2EE declarative security along the way.
- Listener methods are much easier and more flexible; listener parameters in the URL are automatically mapped to listener method parameters, and listener methods can return the page name or page instance to activate.
- Component parameters now just work, without having to worry about "direction".
- Applications can now have a global message catalog, in addition to per-page and per-component message catalogs. Messages not found in the component message catalog are searched for in the application catalog.
- Full, native support for developing JSR-168 Portlets has been added.
- Tapestry 4.0 makes much less use of reflection and OGNL than Tapestry 3.0; partly because there are many new binding prefixes and largely because of how parameters are now implemented.
- HiveMind services and Spring beans to be directly injected into page and component classes.
- Tapestry 4.0 includes optional JDK 1.5 annotation support (but Tapestry still works with JDK 1.3).
- Tapestry 4.0 debuts a new and much more sophisticated user input validation subsystem. Thanks Paul!
- Line precise error reporting can now display the contents of files containing errors.
- Forms can now be canceled, bypassing client-side validation logic, and invoking an alternate listener on the server-side.
- You are no longer limited to just Global and Visit; you can have application state objects as you like.
- The use of HiveMind under the covers means that Tapestry can be easily customized to fit your needs.
- Page properties can now be persisted on the client, as well as in the session.
- Components and component parameters can now be marked as deprecated. Component parameters may have aliases (used when renaming a parameter).
The complete list of changes is almost too numerous to list. Suffice to say, everything is about getting more bang for less work, and reducing the amount of Java code, reducing the complexity of templates, and simplifying (or eliminating) XML files.
Status
Work on Tapestry 4.0 is in full swing. Documentation is being converted from the old DocBook format, to the new Forrest format, leaving many temporary gaps. Only the main code base and the Workbench example is being built, all other example code is not (this unfortunately includes the Virtual Library).
Tapestry 4.0 should be production-ready soon. It needs more exposure and more documentation. For the momement, it is still recommended that you stick with Tapestry 3.0.3, the latest stable release.
Upgrading from Tapestry 3.0
Tapestry 4.0 features a large number of new features, and is some limited cases, backwards compatibility has been compromised. Full details are forthcoming, but in general:
- Tapestry 3.0 page and component specifications are still honored
- Page and component templates have not changed
Things that will cause you trouble when upgrading:
- Defining engine services has changed entirely, as has the IEngineService API
- Subclassing BaseEngine to override exception handling has changed; it is now about creating and contributing new HiveMind services to override the default behavior.
- Parameter direction "custom" is no longer really supported. Defining a parameter always creates a corresponding property.
- The parameterNameBinding property is no longer created for each parameter, instead you must use the getBinding() method.
- The relationship between the page loader and the specification delegate has changed; the specifications provided by the delegate are now cached by the loader (in 3.0, the delegate was responsible for caching).
- The Jakarta commons-lang library is no longer a dependency of Tapestry; this means that the EnumPropertySelectionModel class is no longer available (however, you can easily copy the source from Tapestry 3.0).
- For the Submit component (as well as LinkSubmit and ImageSubmit), the invocation of the listener is (by default) deferred until the end of the form submission, just before the Form's listener is invoked. In Tapestry 3.0, the invocation was immediate. Deferred is better for most, but not all, situations.
Tapestry in Print

Tapestry in Action is now available from Manning Publications. It is the definitive introduction to Tapestry written by Howard Lewis Ship, the creator of Tapestry. Tapestry In Action covers Tapestry 3.0, but is still broadly useful in the wake of the 4.0 release.

Tapestry Webanwendungen mit dem Apache Framework is a fast-paced guide to using Tapestry, focusing on combining Tapestry with other open-source frameworks, as well as developing Tapestry applications using Spindle. The book is written in German, and authored by Stefan Edlich and Patrick Kunert. Covers Tapestry 3.0.
Tapestry has also been described in the print journal The Java Report in the September 2001 issue. Other articles includes the on-line journal OnJava, in November 2001.
Tapestry Community
Tapestry has a very active User mailing list, with archives. This is the list for getting help with using the framework.
The Developer mailing list is for Tapestry committers and other power users to discuss enhancements to the framework. It also has archives.
A Wiki has been set up to discuss Tapestry and plan new features, as well as provide a list of Tapestry tutorials.