Attributes for Struts HTML tags

This reference material describes the attributes for the Struts HTML tag library. By default, each tag name has an html: prefix.

For more information about the Struts tags and tag attributes, refer to the Apache Struts specifications.

Each Struts tag has a number of attributes that you can set by using the Properties view of the tag. Use this table of attributes while working with the Properties view of the tag, to look up attributes for which you want additional detail. Some attributes have the same name but different usage in different elements. The attributes are listed in alphabetical order.

 

Base

Table 1. Base tag attributes
Attribute Description
ref The reference from which the base URI is created:

page

The base uri will be the jsp page location. (default)

site

The base uri will be the application context path.
server Specifies the server name to use instead of request.getServerName().
target Specifies a Window target to which this form is submitted, such as for use in framed presentations.

Return to the top of the page.

 

Button

Table 2. Button tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
onblur Runs the JavaScriptâ„¢ event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Cancel

Table 3. Cancel tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

lang The language code for this element.
onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value. [Required]
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Check Box

Table 4. Check Box tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display image.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value to be transmitted if this check box is selected when the form is submitted. By default, the value

on is returned if the check box is selected.

Return to the top of the page.

 

Errors

Table 5. Errors tag attributes
Attribute Description
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
footer Specifies an optional message resource key that will be printed after the iteration of messages has finished.
header Specifies an optional message resource key that will be printed before the iteration of the messages begins.
locale Specifies the value of the request or session

locale attribute to be used to look up internationalized messages.

name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

prefix Specifies an optional message resource key that is printed before an error message. If it is not specified, it defaults to errors.prefix.
property Specifies the name of the property for which error messages should be displayed. By default, all error messages (regardless of property) are displayed.
suffix Specifies an optional message resource key that is printed after an error message. If it is not specified, it defaults to errors.suffix.

Return to the top of the page.

 

File

Table 6. File tag attributes
Attribute Description
accept Specifies a comma-delimited list of content types that the server to which you submit knows how to process. The list can be used by the client browser to limit the set of file options that is made available for selection. By default, no content type list is sent.
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
maxlength Specifies the maximum number of input characters to accept.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

size Specifies the number of character positions to allocate.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.

Return to the top of the page.

 

Form

Table 7. Form tag attributes
Attribute Description
acceptCharset The list of character encodings for input data that the server should accept.
action Specifies the logical name of a global action that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute. [Required for

form]

dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

enctype Specifies the content encoding to be used to submit this form, if the method is POST. You must set this to multipart/form-data if you are using the file tag to enable file upload. If you omit this attribute, the browser default (normally application/x-www-form-urlencoded) is used.
focus Specifies the field name (among the fields on this form) to which initial focus will be assigned with a JavaScript function. If you omit this attribute, no special JavaScript code for this purpose will be rendered.
focusIndex If the focus field is a field array, such as a radio button group, specifies the index in the array to receive focus.
lang The language code for this element.
method Specifies the HTTP method (

GET or

POST) that will be used to submit this request.

onreset Runs the JavaScript event handler if the form is reset.
onsubmit Runs the JavaScript event handler if the form is submitted.
readonly If set to

true, makes this input field read-only.

scriptLanguage The form's focus <script> element will not contain a language attribute when this is set to false. The default is true but this property is ignored in XHMTL mode.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

target Specifies a Window target to which this form is submitted, such as for use in framed presentations.

Return to the top of the page.

 

Frame

Table 8. Frame tag attributes
Attribute Description
action Specifies the logical name of a global action that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute. [Required for

form]

anchor Specifies an optional anchor tag to be added to the generated hyperlink. Do not specify a number sign (#) in the attribute value.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
forward Specifies the logical name of a global ActionForward that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

frameborder If set to 1, generates a frame border around this frame. The default is 0.
frameName Specifies a value for the

name attribute of the rendered

frame element.

href Specifies the URL to which this hyperlink will transfer control if activated. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

longdesc Specifies the URI of a long description of the frame. This description supplements the short description provided by the

title attribute and might be particularly useful for nonvisual user agents.

marginheight Specifies the amount of space (in pixels) to be left between the frame contents and its top and bottom margins.
marginwidth Specifies the amount of space (in pixels) to be left between the frame contents and its left and right margins.
module Prefix name of a Module that contains the action mapping for the Action that is specified by the action attribute. You must specify an action attribute for this to have an effect.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

noresize If set to

true, prevents users from resizing the frame. The default is

false.

page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

paramId Specifies the name of the request parameter that will be added dynamically to the generated hyperlink. The corresponding value is defined by the

paramName and (optional)

paramProperty attributes and is optionally scoped by the

paramScope attribute.

paramName Specifies the name of a JSP bean that is a String containing the value for the request parameter named by

paramId (if you omit

paramProperty), or a JSP bean whose property getter is called to return a String (if you specify

paramProperty). The JSP bean is constrained to the bean scope specified by the

paramScope property, if it is specified.

paramProperty Specifies the name of a property of the bean specified by the

paramName attribute, whose return value must be a String containing the value of the request parameter (named by the

paramId attribute) that will be added dynamically to this hyperlink.

paramScope Specifies the scope within which to search for the bean specified by the

paramName attribute. By default, all scopes are searched.

property Specifies the name of a property of the bean specified by the

name attribute, whose return value must be a

java.util.Map class that contains the query parameters to be added to the hyperlink. If you specify this attribute, also specify the

name attribute.

scope Specifies the scope within which to search for the bean specified by the

name attribute. By default, all scopes are searched.

scrolling Specifies whether scroll bars are to be created unconditionally (

yes), never (

no), or only when needed (

auto).

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
transaction If set to

true, includes in the generated hyperlink any current transaction control token, so that it will pass an isTokenValid() test in the receiving action.

Return to the top of the page.

 

Hidden

Table 9. Hidden tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of this input field and the name of the corresponding bean property if

value is not specified. The corresponding bean property (if any) must be of type String.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value to which this field should be initialized.
write If set to

true, renders the value of this field to the response page to make it visible, in addition to creating an HTML type="hidden" element? By default, only the hidden element is created.

Return to the top of the page.

 

Image

Table 10. Image tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
align Specifies the alignment for this image.

Deprecated: This attribute is deprecated in HTML 4. The suggested alternative is to use CSS. Fore more details, see www.w3.org/TR/REC-html40/struct/objects.html#h-13.7.4.

alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
border Specifies the width (in pixels) of the border around this image.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
locale Specifies the value of the request or session

locale attribute to be used to look up internationalized messages.

module Prefix name of a Module to which the page or pageKey attributes relate.
onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

pageKey Specifies the key of the message resources string that specifies the module-relative path of the image for this input tag.
property Specifies the property name of this image tag. The parameter names for the request will appear as property.x and property.y, the x and y representing the coordinates of the mouse click for the image. A way of retrieving these values through a form bean is to define getX(), getY(), setX(), and setY() methods, and specify your property as a blank string (property="").
src Specifies the source URL of the image for this input tag.
srcKey Specifies the key of the message resources string that specifies the source URL of the image for this input tag.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Img

Table 11. Img tag attributes
Attribute Description
action Specifies the logical name of a global action that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute. [Required for

form]

align Specifies how the image is aligned, one of the following values:

left

Left-justifies, wrapping text on the right

right

Right-justifies, wrapping text on the left

top

Aligns the image with the top of the text on the same row

middle

Aligns the image vertical center with the text base line

bottom

Aligns the image with the bottom of the text base line

texttop

Aligns the image top with that of the text font on the same line

absmiddle

Aligns the image vertical center with the absolute center of the text

absbottom

Aligns the image with the absolute bottom of the text font on the same row
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
border Specifies the width (in pixels) of the border around this image.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
height Specifies the height of the image being displayed. Specifying this attribute along with along with

width helps the browser render the page faster.

hspace Specifies the amount of horizontal spacing between the image and the text. The text might be in the same paragraph or be wrapped around the image.
imageName Specifies a name to be defined within this page so that you can reference it from scripts within the page. The value that you specify here will be the value of the

name attribute in the generated

img element.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

ismap Specifies the name of the server-side map to which this image belongs.
lang The language code for this element.
locale Specifies the value of the request or session

locale attribute to be used to look up internationalized messages.

module Prefix name of a Module that contains the action mapping for the Action that is specified by the action attribute. You must specify an action attribute for this to have an effect.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element is under the mouse pointer but the pointer is moved outside the element.
onmouseover Runs the JavaScript event handler when this element is not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

pageKey Specifies the key of the message resources string that specifies the module-relative path of the image for this input tag.
paramId Specifies the name of the request parameter that will be added dynamically to the generated hyperlink. The corresponding value is defined by the

paramName and (optional)

paramProperty attributes and is optionally scoped by the

paramScope attribute.

paramName Specifies the name of a JSP bean that is a String containing the value for the request parameter named by

paramId (if you omit

paramProperty), or a JSP bean whose property getter is called to return a String (if you specify

paramProperty). The JSP bean is constrained to the bean scope specified by the

paramScope property, if it is specified.

paramProperty Specifies the name of a property of the bean specified by the

paramName attribute, whose return value must be a String containing the value of the request parameter (named by the

paramId attribute) that will be added dynamically to this hyperlink.

paramScope Specifies the scope within which to search for the bean specified by the

paramName attribute. By default, all scopes are searched.

property Specifies the name of a property of the bean specified by the

name attribute, whose return value must be a

java.util.Map class that contains the query parameters to be added to the hyperlink. If you specify this attribute, also specify the

name attribute.

scope Specifies the scope within which to search for the bean specified by the

name attribute. By default, all scopes are searched.

src Specifies the source URL of the image for this input tag.
srcKey Specifies the key of the message resources string that specifies the source URL of the image for this input tag.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
useLocalEncoding If set to true, LocalCharacterEncoding will be used, that is, the characterEncoding set to the HttpServletResponse, as prefered character encoding rather than UTF-8, when URLEncoding is done on parameters of the URL.
usemap Specifies the name of the map as defined within this page for mapping hot-spot areas of this image.
vspace Specifies the amount of vertical spacing between the image and the text, above and below.
width Specifies the width of the image being displayed. Specifying this attribute along with along with

height helps the browser render the page faster.

Return to the top of the page.

 

Javascript

Table 12. Javascript tag attributes
Attribute Description
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
cdata If set to

true and XHTML has been enabled, wraps the JavaScript code in a CDATA section to prevent XML parsing. The default is

true to comply with the W3C recommendation.

dynamicJavascript If set to

false, does not render dynamic JavaScript code. The default is

true.

formName Specifies the key (form name) to retrieve a specific set of validation rules.
htmlComment Specifies whether or not to enclose the JavaScript code with HTML comments. This attribute is ignored in XHTML mode, because the script would be deleted by the XML parser. For details on hiding scripts from XML parsers, see the

cdata attribute. The default is

true.

method Specifies the HTTP method (

GET or

POST) that will be used to submit this request.

page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

scriptLanguage The <script> element will not contain a language attribute when this is set to false. The default is true but this property is ignored in XHTML mode.
src Specifies the source URL of the image for this input tag.
staticJavascript Specifies whether or not to render the static JavaScript code. The default is

true.

Return to the top of the page.

 

Link

Table 13. Link tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
action Specifies the logical name of a global action that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute. [Required for

form]

anchor Specifies an optional anchor tag to be added to the generated hyperlink. Do not specify a number sign (#) in the attribute value.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
forward Specifies the logical name of a global ActionForward that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

href Specifies the URL to which this hyperlink will transfer control if activated. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

indexed Valid only inside an

logic:iterate tag. If

true, adds the

indexed parameter with name from

indexId attribute to the query string. The

indexed parameter looks like index[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

indexId Specifies a different name for the

indexed parameter. For more information, see the

indexed attribute.

lang The language code for this element.
linkName Specifies the anchor name to be defined within this page so that hyperlinks within the page can reference it. The value that you specify here will be the value of the

name attribute in the generated

anchor tag.

module Prefix name of a Module that contains the action mapping for the Action that is specified by the action attribute. You must specify an action attribute for this to have an effect.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

paramId Specifies the name of the request parameter that will be added dynamically to the generated hyperlink. The corresponding value is defined by the

paramName and (optional)

paramProperty attributes and is optionally scoped by the

paramScope attribute.

paramName Specifies the name of a JSP bean that is a String containing the value for the request parameter named by

paramId (if you omit

paramProperty), or a JSP bean whose property getter is called to return a String (if you specify

paramProperty). The JSP bean is constrained to the bean scope specified by the

paramScope property, if it is specified.

paramProperty Specifies the name of a property of the bean specified by the

paramName attribute, whose return value must be a String containing the value of the request parameter (named by the

paramId attribute) that will be added dynamically to this hyperlink.

paramScope Specifies the scope within which to search for the bean specified by the

paramName attribute. By default, all scopes are searched.

property Specifies the name of a property of the bean specified by the

name attribute, whose return value must be a

java.util.Map class that contains the query parameters to be added to the hyperlink. If you specify this attribute, also specify the

name attribute.

scope Specifies the scope within which to search for the bean specified by the

name attribute. By default, all scopes are searched.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
target Specifies a Window target to which this form is submitted, such as for use in framed presentations.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
transaction If set to

true, includes in the generated hyperlink any current transaction control token, so that it will pass an isTokenValid() test in the receiving action.

useLocalEncoding If set to true, LocalCharacterEncoding will be used, that is, the characterEncoding set to the HttpServletResponse, as prefered character encoding rather than UTF-8, when URLEncoding is done on parameters of the URL.

Return to the top of the page.

 

Messages

Table 14. Messages tag attributes
Attribute Description
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
footer Specifies an optional message resource key that will be printed after the iteration of messages has finished.
header Specifies an optional message resource key that will be printed before the iteration of the messages begins.
id Specifies the required name of a page scope JSP bean that will contain the current element of the collection of messages on each iteration, if it is not null.

Note: This is a required attribute.

locale Specifies the value of the request or session

locale attribute to be used to look up internationalized messages.

message If set to

true, retrieves the bean from the Globals.MESSAGE_KEY constant string and ignores any value assigned to the

name attribute. By default the tag retrieves from the Globals.ERROR_KEY constant string the bean over which it will iterate.

name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

property Specifies the name of the property for which messages should be displayed. By default, all messages (regardless of property) are displayed.

Return to the top of the page.

 

Multibox

Table 15. Multibox tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value to be transmitted if this check box is selected when the form is submitted. By default, the value

on is returned if the check box is selected.

Return to the top of the page.

 

Option

Table 16. Option tag attributes
Attribute Description
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

filter If set to

false, suppresses filtering of option labels for sensitive characters in HTML. By default, such values are converted to their entity equivalents.

key If specified, defines the message key to be looked up in the resource bundle specified by

bundle for the text displayed to the user for this option. The default is to take from the body content of this tag the text to be displayed.

lang The language code for this element.
locale Specifies the value of the request or session

locale attribute to be used to look up internationalized messages.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

value Specifies the value to be submitted for this field if this option is selected by the user.

Note: This is a required attribute.

Return to the top of the page.

 

Options

Table 17. Options tag attributes
Attribute Description
collection Specifies the name of the JSP bean (in some scope), which is a collection of other beans, each of which has properties named by the

property and

labelProperty attributes that are used to retrieve the value and label for each option.

filter If set to

false, suppresses filtering of option labels for sensitive characters in HTML. By default, such values are converted to their entity equivalents.

labelName Specifies the name of the JSP bean (in some scope) that contains the collection of labels to be displayed to the user for these options.
labelProperty Specifies the property of the form bean, or the bean specified by the

labelName attribute, that will return the collection of labels to be displayed to the user for these options.

name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

property Specifies the property of the form bean, or the bean specified by the

name attribute, that will return the collection of valuesreturned to the server for these options.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

Return to the top of the page.

 

Options Collection

Table 18. Options Collection tag attributes
Attribute Description
filter If set to

false, suppresses filtering of option labels for sensitive characters in HTML. By default, such values are converted to their entity equivalents.

label Specifies the property of the bean within the collection which represents the label to be rendered for each option. The default is label.
name Specifies the attribute name of the bean whose properties are consulted when rendering the current value of this input field. By default, the bean associated with the form tag within which this element is nested is utilized.
property Specifies the property of the form bean, or the bean specified by the

name attribute, that will return the collection of valuesreturned to the server for these options.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

value Specifies the property of the bean within the collection which represents the value to be rendered for each option. The default is value.

Return to the top of the page.

 

Password

Table 19. Password tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
maxlength Specifies the maximum number of input characters to accept.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

readonly If set to

true, makes this input field read-only.

redisplay If set to

false, indicates that existing values will not be redisplayed. Even though a redisplayed value is shown as asterisks on the visible HTML page, the clear text of the actual password value is visible though the Show Page Source menu option of the client browser. The default is

true. You might wish to set the value to

false on login pages.

size Specifies the number of character positions to allocate.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Radio

Table 20. Radio tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
idName Specifies the name of the bean (in some scope) that will return the value of the

radio tag. When the

idName attribute, usually exposed by an iterator, is present, the

value attribute is used as the name of the property on the

idName bean that will return the value of the radio tag for this iteration.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the corresponding bean property for this radio tag.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Reset

Table 21. Reset tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

lang The language code for this element.
onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the input field that will be generated.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Rewrite

Table 22. Rewrite tag attributes
Attribute Description
action Specifies the logical name of a global action that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute. [Required for

form]

anchor Specifies an optional anchor tag to be added to the generated hyperlink. Do not specify a number sign (#) in the attribute value.
forward Specifies the logical name of a global ActionForward that contains the actual content-relative URI of the destination of this transfer. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

href Specifies the URL to which this hyperlink will transfer control if activated. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

module Prefix name of a Module that contains the action mapping for the Action that is specified by the action attribute. You must specify an action attribute for this to have an effect.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

page Specifies the module-relative path, beginning with a slash (/), to which this hyperlink, if activated, will transfer control. You must specify one of the following attributes:

action,

forward,

href, or

page. You can modify this hyperlink dynamically by adding the

paramId or

name attribute.

paramId Specifies the name of the request parameter that will be added dynamically to the generated hyperlink. The corresponding value is defined by the

paramName and (optional)

paramProperty attributes and is optionally scoped by the

paramScope attribute.

paramName Specifies the name of a JSP bean that is a String containing the value for the request parameter named by

paramId (if you omit

paramProperty), or a JSP bean whose property getter is called to return a String (if you specify

paramProperty). The JSP bean is constrained to the bean scope specified by the

paramScope property, if it is specified.

paramProperty Specifies the name of a property of the bean specified by the

paramName attribute, whose return value must be a String containing the value of the request parameter (named by the

paramId attribute) that will be added dynamically to this hyperlink.

paramScope Specifies the scope within which to search for the bean specified by the

paramName attribute. By default, all scopes are searched.

property Specifies the name of a property of the bean specified by the

name attribute, whose return value must be a

java.util.Map class that contains the query parameters to be added to the hyperlink. If you specify this attribute, also specify the

name attribute.

scope Specifies the scope within which to search for the bean specified by the

name attribute. By default, all scopes are searched.

transaction If set to

true, includes in the generated hyperlink any current transaction control token, so that it will pass an isTokenValid() test in the receiving action.

useLocalEncoding If set to true, LocalCharacterEncoding will be used, that is, the characterEncoding set to the HttpServletResponse, as prefered character encoding rather than UTF-8, when URLEncoding is done on parameters of the URL.

Return to the top of the page.

 

Select

Table 23. Select tag attributes
Attribute Description
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
multiple Specifies the maximum number of input characters to accept.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

rows Specifies the number of rows to display.
scope Specifies the scope within which to search for the bean specified by the

name attribute. By default, all scopes are searched.

scrolling Specifies whether scroll bars are to be created unconditionally (

yes), never (

no), or only when needed (

auto).

size Specifies the number of character positions to allocate.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
usemap Specifies the name of the map as defined within this page for mapping hot-spot areas of this image.
value Specifies the value to compare with for marking an option selected.

Return to the top of the page.

 

Submit

Table 24. Submit tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
property Specifies the name of the request parameter that will be included with this submission, set to the specified value.

Note: This is a required attribute.

style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter.

Return to the top of the page.

 

Text

Table 25. Text tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
maxlength Specifies the maximum number of input characters to accept.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
onselect Runs the JavaScript event handler when a when a user selects some text in a text field.
property Specifies the name of this input field, and the name of the corresponding bean property if

value is not specified. The corresponding bean property (if any) must be of type String.

Note: This is a required attribute.

readonly If set to

true, makes this input field read-only.

size Specifies the number of character positions to allocate.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value to which this field should be initialized.

Return to the top of the page.

 

Text Area

Table 26. Text Area tag attributes
Attribute Description
accesskey Specifies the keyboard character to be used to move focus immediately to this element.
alt Specifies alternate text for a component. This alternate text serves as content when the element cannot be rendered normally, for example, if the browser does not support forms or is set so that it does not display images.
altKey Specifies the message resources key of the alternate text for this element.
bundle Specifies the servlet context attribute key for the MessageResources instance to use. It defaults to the application resources that is configured for the action servlet.
cols Specifies the number of columns to display.
dir The direction for weak/neutral text for this element.
disabled If set to

true, disables the input field.

errorKey Name of the bean, in any scope, under which error messages are stored. If this attribute is not present, the name specified by the Globals.ERROR_KEY constant string is used. This attribute is used in conjunction with the errorStyle, errorStyleClass and errorStyleId attributes and should be set to the same value as the name attribute on the <html:errors/> tag.
errorStyle CSS styles applied to this HTML element if an error exists. If present, this attribute overrides the style attribute in the event of an error.
errorStyleClass CSS stylesheet class applied to this HTML element if an error exists. It renders a If present, this attribute overrides the styleClass attribute in the event of an error.
errorStyleId Identifier applied to this HTML element if an error exists. If present, this attribute overrides the styleId attribute in the event of an error.
indexed Valid only inside an

logic:iterate tag. If

true, renders the name of the

html tag as propertyName[int], where int will be generated for every iteration and taken from the ancestor

logic:iterate tag.

lang The language code for this element.
name Specifies the name of a JSP bean that contains a map that represents the query parameters (if

property is not specified) or a JSP bean whose property getter is called to return a map (if

property is specified).

onblur Runs the JavaScript event handler when this element loses input focus.
onchange Runs the JavaScript event handler when this element loses input focus and its value has changed.
onclick Runs the JavaScript event handler when this element receives a mouse click.
ondblclick Runs the JavaScript event handler when this element receives a mouse double-click.
onfocus Runs the JavaScript event handler when this element receives input focus.
onkeydown Runs the JavaScript event handler when this element has focus and a key is depressed.
onkeypress Runs the JavaScript event handler when this element has focus and a key is depressed and released.
onkeyup Runs the JavaScript event handler when this element has focus and a key is released.
onmousedown Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is depressed.
onmousemove Runs the JavaScript event handler when this element is under the mouse pointer and the pointer is moved.
onmouseout Runs the JavaScript event handler when this element was under the mouse pointer but the pointer was moved outside the element.
onmouseover Runs the JavaScript event handler when this element was not under the mouse pointer but the pointer is moved inside the element.
onmouseup Runs the JavaScript event handler when this element is under the mouse pointer and a mouse button is released.
onselect Runs the JavaScript event handler when a when a user selects some text in a text field.
property Specifies the name of this input field, and the name of the corresponding bean property if

value is not specified. The corresponding bean property (if any) must be of type String.

Note: This is a required attribute.

redisplay If set to

false, indicates that existing values will not be redisplayed. Even though a redisplayed value is shown as asterisks on the visible HTML page, the clear text of the actual password value is visible though the Show Page Source menu option of the client browser. The default is

true. You might wish to set the value to

false on login pages.

rows Specifies the number of rows to display.
style Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red").
styleClass Specifies the CSS stylesheet class to be applied to this HTML element. This creates a

class attribute.

styleId Specifies an identifier to be assigned to this HTML element. This creates an

id attribute.

tabindex Sets the tab order (ascending positive integers) for this element.
title Specifies the advisory title for this element.
titleKey Specifies the message resources key for the advisory title for this element.
value Specifies the value to which this field should be initialized.

Return to the top of the page.

 

Xhtml

The Xhtml tag does not have any attributes.

Return to the top of the page.