Working with the Struts Custom Tag Libraries

There are five tag libraries available with Struts 1.1. Each library contains multiple tags. The libraries are Struts-html, Struts-bean, Struts-logic, Struts-nested, Struts-template. It's always possible—at some point when using tags—to make a mistake. If a tag is used incorrectly by way of specifying the wrong attributes, a JspException will be thrown at runtime. Tags—in both the Struts-html and Struts-bean libraries—that support the property attribute generally support simple, nested, and indexed references. A simple reference is similar to the syntax of the standard , . The tags implemented in the Struts-html taglib are used to create Struts input forms as well as HTML-based user interfaces. The tags provided in the Struts-template tag library are useful when you have dynamic JSPs that require a common format. Using the Struts-template tags allows a convenient way to handle work within a given format. This chapter provides a number of examples that detail the way to use various tags from each of the tag libraries. There is a good chance that anything can be accomplished through the use of existing tags that are either provided with Struts or provided from other sources such as the JSTL, or Jakarta Taglibs project.