1.0
1.1
STRUTS Framework Tag Library
http://jakarta.apache.org/taglibs/struts-1.0
This tag library contains useful general-purpose tags supporting the
development of JSP/servlet applications based on the "Model 2" (MVC
based) design pattern.
enumerate
org.apache.struts.taglib.EnumerateTag
org.apache.struts.taglib.EnumerateTei
JSP
Repeat the body of this tag for each element of the collection
specified by our attributes. The collection may be an object
itself, or may be a bean property. The collection may be an
Enumeration, a Hashtable, a Vector, or an object array. The
following attributes are supported:
id - Attribute name of the page scope attribute which is
visible to the body tag, and contains the current
element from the collection.
name - Attribute name of the collection itself (if property
is not specified) or the bean whose property is to
be retrieved as the collection.
property - Property name of the bean property containing the
collection, if any. [The "name" attribute identifies
the collection bean itself]
id
true
false
name
true
false
property
false
false
ifParameterEquals
org.apache.struts.taglib.IfParameterEqualsTag
JSP
Conditionally evaluate the body of this tag, if the specified
parameter has the specified value. For the purposes of this
comparision, a missing parameter is treated as if is a zero-length
string. The following attributes are supported:
name - Name of the parameter to be retrieved. [REQUIRED]
value - Value to be compared. [REQUIRED]
name
true
false
value
true
false
ifParameterNotEquals
org.apache.struts.taglib.IfParameterNotEqualsTag
JSP
Conditionally evaluate the body of this tag, if the specified
parameter does not have the specified value. For the purposes of this
comparision, a missing parameter is treated as if is a zero-length
string. The following attributes are supported:
name - Name of the parameter to be retrieved. [REQUIRED]
value - Value to be compared. [REQUIRED]
name
true
false
value
true
false
errors
org.apache.struts.taglib.ErrorsTag
If an action class has created a String[] request attribute under the
standard key, it is rendered as a list of errors that must be fixed
on the form that is presumably next on this page. Otherwise, nothing
will be rendered.
form
org.apache.struts.taglib.FormTag
JSP
Generates an HTML <FORM> tag, containing the template text
and nested field elements inside. This tag also implicitly uses
or creates a bean (in the specified scope) with the given name and
Java class. The following attributes are supported, with default
values in square brackets:
action - URL to which this form will be submitted. [This page]
method - The HTTP method used to submit this requeest (GET, POST).
[POST]
name - The name of the attribute to be accessed or created in
page scope, as well as the name of the scripting variable
to be created referencing this attribute.
scope - The JSP scope within which this bean is created or
accessed (request, session). [session]
type - Java class of the bean object to be created, if necessary
[Runtime error if creation is needed]
action
false
false
method
false
false
name
true
false
scope
false
false
type
true
false
checkbox
org.apache.struts.taglib.CheckboxTag
Generates an HTML <INPUT> tag of type "checkbox", based
on the specified attributes. This tag must be nested inside a
form tag. The following attributes are supported, with default
values in square brackets.
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag. The
property must be of type "boolean".
value - A string representing whether the checkbox should be
initialized as checked ("true" or "yes"). [Use the
corresponding property value from the bean]
name
true
false
value
false
false
hidden
org.apache.struts.taglib.HiddenTag
Generates an HTML <INPUT> tag of type "hidden", based on the
specified attributes. This tag must be nested inside a form tag.
The following attributes are supported, with default values in
square brackets:
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag.
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
name
name
false
value
false
false
option
org.apache.struts.taglib.OptionTag
Generates an HTML <OPTION> element, which must be nested within
a corresponding "select" tag. If the value specified here matches
the value of the underlying "select" tag, this option will be
marked as "selected" in the rendered element. The body of this
tag will be presented to the user in the option list.
value - The value returned if this option is selected, and is matched
against the underlying property.
value
true
false
password
org.apache.struts.taglib.PasswordTag
Generates an HTML <INPUT> tag of type "password", based on the
specified attributes. This tag must be nested inside a form tag.
The following attributes are supported, with default values in
square brackets:
maxlength - Maximum number of characters allowed. [No limit]
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag.
size - Number of character positions defined. [Browser default]
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
maxlength
false
false
name
name
false
size
false
false
value
false
false
property
org.apache.struts.taglib.PropertyTag
Generates the value of the specified property as readonly text.
This tag must be nested inside a form tag. The following attributes
are supported, with default values in square brackets:
name - The name of the property we are displaying.
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
name
name
false
value
false
false
radio
org.apache.struts.taglib.RadioTag
Generates an HTML <INPUT> tag of type "radio", based
on the specified attributes. This tag must be nested inside a
form tag. The following attributes are supported, with default
values in square brackets.
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag. The
property must be of type "boolean".
value - A String value matched against the underlying property
value. If they match, this radio button will be
rendered as "checked".
name
true
false
value
true
false
reset
org.apache.struts.taglib.ResetTag
Generates an HTML <INPUT> tag of type "reset".
The following attributes are supported:
value - The value that will be defined for this button
[Body of this tag or "Reset"]
select
org.apache.struts.taglib.SelectTag
JSP
Generates an HTML <SELECT> element, based on the specified
attributes. You must use "option" tags nested within this tag
to establish the values of the available options -- any such option
that matches the current property value will be marked selected.
The following attributes are supported, with default values in
square brackets:
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag.
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
name
true
false
value
false
false
submit
org.apache.struts.taglib.SubmitTag
Generates an HTML <INPUT> tag of type "submit", based
on the specified attributes. This tag must be nested inside a
form tag. The following attributes are supported, with default
values in square brackets.
name - The name of a request parameter that will be included
with this form submission. [submit]
value - The value that will be defined for this request
parameter, if this submit button is pressed.
[Body of this tag or "Submit"]
name
false
false
value
false
false
text
org.apache.struts.taglib.TextTag
Generates an HTML <INPUT> tag of type "text", based on the
specified attributes. This tag must be nested inside a form tag.
The following attributes are supported, with default values in
square brackets:
maxlength - Maximum number of characters allowed. [No limit]
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag.
size - Number of character positions defined. [Browser default]
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
maxlength
false
false
name
name
false
size
false
false
value
false
false
textarea
org.apache.struts.taglib.TextareaTag
Generates an HTML <TEXTAREA> tag, based on the
specified attributes. This tag must be nested inside a form tag.
The following attributes are supported, with default values in
square brackets:
cols - The number of columns allowed for the textarea.
[Browser default]
name - The name of the input field, and of the corresponding
property in the bean specified in our form tag.
rows - The number of rows allowed for the textarea.
[Browser default]
value - Value with which to initialize this field.
[Corresponding property from the bean specified
in our form tag]
maxlength
false
false
name
name
false
size
false
false
value
false
false
encodeRedirectURL
org.apache.struts.taglib.EncodeRedirectURLTag
Encodes the URL specified by the "url" attribute with the
session identifier, if the client is not supporting cookies.
The following attributes are supported:
url - URL to be encoded
url
true
false
encodeURL
org.apache.struts.taglib.EncodeURLTag
Encodes the URL specified by the "url" attribute with the
session identifier, if the client is not supporting cookies.
The following attributes are supported:
url - URL to be encoded
url
true
false
getProperty
org.apache.struts.taglib.GetPropertyTag
Retrieves the specified property from the bean with the specified
attribute name, and makes it available as a scripting variable
for the remainder of the current page. The following attributes
are supported:
id - Attribute key under which the property will be exposed.
name - Name of the bean conaining the property to be
retrieved and exposed.
property - Name of the property to be retrieved and exposed.
id
true
false
name
true
false
property
true
false
htmlProperty
org.apache.struts.taglib.HtmlPropertyTag
Places the value of a Bean instance property, converted to a
String, into the implicit "out" object. It performs the same
function as the standard <jsp:getProperty> tag, except
that the output is encoded appropriately so that characters
significant to HTML do not cause any problems. The supported
attributes are as follows, with default values in square brackets:
name - Name of the object instance from which the property
is obtained. This object can be in any scope. [REQUIRED]
property - Name of the property to be retrieved. [REQUIRED]
name
true
false
property
true
false
link
org.apache.struts.taglib.LinkTag
JSP
Generates a URL encoded hyperlink to the specified URI, with the
body of this tag being the hyperlink text value.
The supported attributes are as follows, with default values in
square brackets.
href - Hyperlink URI to be encoded.
href
true
false
parameter
org.apache.struts.taglib.ParameterTag
Place the value of the specified parameter, suitably HTML filtered,
into the output stream. If no parameter value is found, a zero
length string is inserted. The supported attributes are as follows,
with default values in square brackets.
name - Name of the query parameter to retrieve.
name
true
false
message
org.apache.struts.taglib.MessageTag
Retrieves an internationalized message from the application resources
component that has been loaded by our controller servlet as a servlet
context attribute. The supported attributes are as follows, with
default values in square brackets:
bundle - Servlet context attribute key of the resources to be
accessed. [applicationResources]
locale - The language and/or country selector to use (request
time variables allowed). [Default Locale]
key - Message key of the requested message. [REQUIRED - NO DEFAULT]
arg0 - First optional argument for parametric replacement. [NONE]
arg1 - Second optional argument for parametric replacement. [NONE]
arg2 - Third optional argument for parametric replacement. [NONE]
arg3 - Fourth optional argument for parametric replacement. [NONE]
arg4 - Fifth optional argument for parametric replacement. [NONE]
bundle
false
false
locale
false
false
key
true
false
arg0
false
false
arg1
false
false
arg2
false
false
arg3
false
false
arg4
false
false