Struts HTML Tags
The Struts
HTML tag
library contains tags used to create HTML input forms, as well as
other tags generally useful in the creation of HTML-based user
interfaces. For example, instead of using a regular HTML text-input
field, you can use the text
tag from this library.
These tags are designed to work very closely with the other
components of the Struts framework, including
ActionForm
s. You always should attempt to use one
of these tags first, rather than using standard HTML. These
tags’ special knowledge of the rest of the Struts
components makes it worthwhile to use them.
Most of the tags within this library must be nested inside of a
Struts form
tag. There are a few tags included in
this library that address issues not necessarily related to forms or
form widgets. Those tags also will be discussed briefly in this
section. Although not every HTML tag will be discussed, Table 8-1 provides a complete list of the tags that are
available in the HTML tag library.
Table 8-1. Custom tags within the Struts HTML tag library
Tag name |
Description |
---|---|
|
Renders an HTML |
|
Renders a button input field |
|
Renders a cancel button |
|
Renders a checkbox input field |
|
Conditionally renders a set of accumulated error messages |
|
Renders a file select input field |
|
Defines an HTML |
|
Renders an HTML |
|
Renders a hidden field |
|
Renders an HTML |
|
Renders ... |
Get Programming Jakarta Struts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.