Tag reference sheet

Tag library reference for the following tag libraries:

bean

<p><strong>Note: Some of the features in this taglib are also available in the <a href="http://java.sun.com/products/jsp/jstl/">JavaServer Pages Standard Tag Library (JSTL)</a>. The Struts team encourages the use of the standard tags over the Struts specific tags when possible.</strong></p> <p>This tag library contains tags useful in accessing beans and their properties, as well as defining new beans (based on these accesses) that are accessible to the remainder of the page via scripting variables and page scope attributes. Convenient mechanisms to create new beans based on the value of request cookies, headers, and parameters are also provided.</p> <p>Many of the tags in this tag library will throw a <code>JspException</code> at runtime when they are utilized incorrectly (such as when you specify an invalid combination of tag attributes). JSP allows you to declare an "error page" in the <code>&lt;%@ page %&gt;</code> directive. If you wish to process the actual exception that caused the problem, it is passed to the error page as a request attribute under key <code>org.apache.struts.action.EXCEPTION</code>.</p>

This is version 1.3.

  • cookie Define a scripting variable based on the value(s) of the specified request cookie
  • define Define a scripting variable based on the value(s) of the specified bean property
  • header Define a scripting variable based on the value(s) of the specified request header
  • include Load the response from a dynamic application request and make it available as a bean
  • message Render an internationalized message string to the response
  • page Expose a specified item from the page context as a bean
  • parameter Define a scripting variable based on the value(s) of the specified request parameter
  • resource Load a web application resource and make it available as a bean
  • size Define a bean containing the number of elements in a Collection or Map
  • struts Expose a named Struts internal configuration object as a bean
  • write Render the value of the specified bean property to the current JspWriter
Required attributes are marked with a *

<bean:cookie>

<p><strong> Define a scripting variable based on the value(s) of the specified request cookie. </strong></p> <p>Retrieve the value of the specified request cookie (as a single value or multiple values, depending on the <code>multiple</code> attribute), and define the result as a page scope attribute of type <code>Cookie</code> (if <code>multiple</code> is not specified) or <code>Cookie[]</code> (if <code>multiple</code> is specified).</p> <p>If no cookie with the specified name can be located, and no default value is specified, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified request cookie.</p> String
multiple <p>If any arbitrary value for this attribute is specified, causes all matching cookies to be accumulated and stored into a bean of type <code>Cookie[]</code>. If not specified, the first value for the specified cookie will be retrieved as a value of type <code>Cookie</code>.</p> String
name* <p>Specifies the name of the request cookie whose value, or values, is to be retrieved.</p> String
value <p>The default cookie value to return if no cookie with the specified name was included in this request.</p> String

<bean:define>

<p><strong> Define a scripting variable based on the value(s) of the specified bean property. </strong></p> <p>Create a new attribute (in the scope specified by the <code>toScope</code> property, if any), and a corresponding scripting variable, both of which are named by the value of the <code>id</code> attribute. The corresponding value to which this new attribute (and scripting variable) is set are specified via use of exactly one of the following approaches (trying to use more than one will result in a JspException being thrown):</p> <ul> <li>Specify a <code>name</code> attribute (plus optional <code>property</code> and <code>scope</code> attributes) - The created attribute and scripting variable will be of the type of the retrieved JavaBean property, unless it is a Java primitive type, in which case it will be wrapped in the appropriate wrapper class (i.e. int is wrapped by java.lang.Integer).</li> <li>Specify a <code>value</code> attribute - The created attribute and scripting variable will be of type <code>java.lang.String</code>, set to the value of this attribute.</li> <li>Specify nested body content - The created attribute and scripting variable will be of type <code>java.lang.String</code>, set to the value of the nested body content.</li> </ul> <p>If a problem occurs while retrieving the specified bean property, a request time exception will be thrown.</p> <p>The <code>&lt;bean:define&gt;</code> tag differs from <code>&lt;jsp:useBean&gt;</code> in several ways, including:</p> <ul> <li>Unconditionally creates (or replaces) a bean under the specified identifier.</li> <li>Can create a bean with the value returned by a property getter of a different bean (including properties referenced with a nested and/or indexed property name).</li> <li>Can create a bean whose contents is a literal string (or the result of a runtime expression) specified by the <code>value</code> attribute.</li> <li>Does not support nested content (such as <code>&lt;jsp:setProperty&gt;</code> tags) that are only executed if a bean was actually created.</li> </ul> <p><strong>USAGE NOTE</strong> - There is a restriction in the JSP 1.1 Specification that disallows using the same value for an <code>id</code> attribute more than once in a single JSP page. Therefore, you will not be able to use <code>&lt;bean:define&gt;</code> for the same bean name more than once in a single page.</p> <p><strong>USAGE NOTE</strong> - If you use another tag to create the body content (e.g. bean:write), that tag must return a non-empty String. An empty String equates to an empty body or a null String, and a new scripting variable cannot be defined as null. Your bean must return a non-empty String, or the define tag must be wrapped within a logic tag to test for an empty or null value.</p> <p><strong>USAGE NOTE</strong> - You cannot use bean:define to <strong>instantiate</strong> a DynaActionForm (type="org.apache.struts.action.DynaActionForm") with the properties specified in the struts-config. The mechanics of creating the dyna-properties is complex and cannot be handled by a no-argument constructor. If you need to create an ActionForm this way, you must use a conventional ActionForm. </p> <p>See the Bean Developer's Guide section on <a href="../api/org/apache/struts/taglib/bean/package-summary.html#doc.Creation"> bean creation</a> for more information about these differences, as well as alternative approaches to introducing beans into a JSP page.</p>

Can contain: JSP

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified property.</p> String
name <p>Specifies the attribute name of the bean whose property is accessed to define a new page scope attribute (if <code>property</code> is also specified) or the attribute name of the bean that is duplicated with the new reference created by this tag (if <code>property</code> is not also specified). This attribute is required unless you specify a <code>value</code> attribute or nested body content.</p> String
property <p>Specifies the name of the property to be accessed on the bean specified by <code>name</code>. This value may be a simple, indexed, or nested property reference expression. If not specified, the bean identified by <code>name</code> is given a new reference identified by <code>id</code>.</p> String
scope <p>Specifies the variable scope searched to retrieve the bean specified by <code>name</code>. If not specified, the default rules applied by <code>PageContext.findAttribute()</code> are applied.</p> String
toScope <p>Specifies the variable scope into which the newly defined bean will be created. If not specified, the bean will be created in <code>page</code> scope.</p> String
type <p>Specifies the fully qualified class name of the value to be exposed as the <code>id</code> attribute.</p> String
value <p>The <code>java.lang.String</code> value to which the exposed bean should be set. This attribute is required unless you specify the <code>name</code> attribute or nested body content.</p> String

<bean:header>

<p><strong> Define a scripting variable based on the value(s) of the specified request header. </strong></p> <p>Retrieve the value of the specified request header (as a single value or multiple values, depending on the <code>multiple</code> attribute), and define the result as a page scope attribute of type <code>String</code> (if <code>multiple</code> is not specified) or <code>String[]</code> (if <code>multiple</code> is specified).</p> <p>If no header with the specified name can be located, and no default value is specified, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified request header.</p> String
multiple <p>If any arbitrary value for this attribute is specified, causes a call to <code>HttpServletRequest.getHeaders()</code> and a definition of the result as a bean of type <code>String[]</code>. Otherwise, <code>HttpServletRequest.getHeader()</code> will be called, and a definition of the result as a bean of type <code>String</code> will be performed.</p> String
name* <p>Specifies the name of the request header whose value, or values, is to be retrieved.</p> String
value <p>The default header value to return if no header with the specified name was included in this request.</p> String

<bean:include>

<p><strong> Load the response from a dynamic application request and make it available as a bean. </strong></p> <p>Perform an internal dispatch to the specified application component (or external URL) and make the response data from that request available as a bean of type <code>String</code>. This tag has a function similar to that of the standard <code>&lt;jsp:include&gt;</code> tag, except that the response data is stored in a page scope attribute instead of being written to the output stream. If the current request is part of a session, the generated request for the include will also include the session identifier (and thus be part of the same session).</p> <p>The URL used to access the specified application component is calculated based on which of the following attributes you specify (you must specify exactly one of them):</p> <ul> <li><em>forward</em> - Use the value of this attribute as the name of a global <code>ActionForward</code> to be looked up, and use the module-relative or context-relative URI found there.</li> <li><em>href</em> - Use the value of this attribute unchanged (since this might link to a resource external to the application, the session identifier is <strong>not</strong> included.</li> <li><em>page</em> - Use the value of this attribute as an module-relative URI to the desired resource.</li> </ul>

Can contain: empty

Attributes

NameDescriptionType
anchor <p>Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value <strong>without</strong> any "#" character.</p> String
forward <p>Logical name of a global <code>ActionForward</code> that contains the actual content-relative URI of the resource to be included.</p> String
href <p>Absolute URL (including the appropriate protocol prefix such as "http:") of the resource to be included. Because this URL could be external to the current web application, the session identifier will <strong>not</strong> be included in the request.</p> String
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified web application resource.</p> String
page <p>Module-relative URI (starting with a '/') of the web application resource to be included.</p> String
transaction <p>Set to <code>true</code> if you want the current transaction control token included in the generated URL for this include.</p> boolean

<bean:message>

<p><strong> Render an internationalized message string to the response. </strong></p> <p>Retrieves an internationalized message for the specified locale, using the specified message key, and write it to the output stream. Up to five parametric replacements (such as "{0}") may be specified.</p> <p>The message key may be specified directly, using the <code>key</code> attribute, or indirectly, using the <code>name</code> and <code>property</code> attributes to obtain it from a bean.</p> <p> <strong>JSTL</strong>: The equivalent JSTL tag is &lt;fmt:message&gt;. For example, <br/> <code> &lt;fmt:message key="my.msg.key"&gt; &lt;fmt:param value="replacement text"/&gt; &lt;/fmt:message&gt; </code> </p>

Can contain: empty

Attributes

NameDescriptionType
arg0 <p>First parametric replacement value, if any.</p> String
arg1 <p>Second parametric replacement value, if any.</p> String
arg2 <p>Third parametric replacement value, if any.</p> String
arg3 <p>Fourth parametric replacement value, if any.</p> String
arg4 <p>Fifth parametric replacement value, if any.</p> String
bundle <p>The name of the application scope bean under which the <code>MessageResources</code> object containing our messages is stored.</p> String
key <p>The message key of the requested message, which must have a corresponding value in the message resources. If not specified, the key is obtained from the <code>name</code> and <code>property</code> attributes.</p> String
locale <p>The name of the session scope bean under which our currently selected <code>Locale</code> object is stored.</p> String
name <p>Specifies the attribute name of the bean whose property is accessed to retrieve the value specified by <code>property</code> (if specified). If <code>property</code> is not specified, the value of this bean itself will be used as the message resource key.</p> String
property <p>Specifies the name of the property to be accessed on the bean specified by <code>name</code>. This value may be a simple, indexed, or nested property reference expression. If not specified, the value of the bean identified by <code>name</code> will itself be used as the message resource key.</p> String
scope <p>Specifies the variable scope searched to retrieve the bean specified by <code>name</code>. If not specified, the default rules applied by <code>PageContext.findAttribute()</code> are applied.</p> String

<bean:page>

<p><strong> Expose a specified item from the page context as a bean. </strong></p> <p>Retrieve the value of the specified item from the page context for this page, and define it as a scripting variable, and a page scope attribute accessible to the remainder of the current page.</p> <p>If a problem occurs while retrieving the specified configuration object, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified page context property.</p> String
property* <p>Name of the property from our page context to be retrieved and exposed. Must be one of <code>application</code>, <code>config</code>, <code>request</code>, <code>response</code>, or <code>session</code>. </p> String

<bean:parameter>

<p><strong> Define a scripting variable based on the value(s) of the specified request parameter. </strong></p> <p>Retrieve the value of the specified request parameter (as a single value or multiple values, depending on the <code>multiple</code> attribute), and define the result as a page scope attribute of type <code>String</code> (if <code>multiple</code> is not specified) or <code>String[]</code> (if <code>multiple</code> is specified).</p> <p>If no request parameter with the specified name can be located, and no default value is specified, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified request parameter.</p> String
multiple <p>If any arbitrary value for this attribute is specified, causes a call to <code>ServletRequest.getParameterValues()</code> and a definition of the result as a bean of type <code>String[]</code>. Otherwise, <code>ServletRequest.getParameter()</code> will be called, and a definition of the result as a bean of type <code>String</code> will be performed.</p> String
name* <p>Specifies the name of the request parameter whose value, or values, is to be retrieved.</p> String
value <p>The default parameter value to return if no parameter with the specified name was included in this request.</p> String

<bean:resource>

<p><strong> Load a web application resource and make it available as a bean. </strong></p> <p>Retrieve the value of the specified web application resource, and make it available as either a <code>InputStream</code> or a <code>String</code>, depending on the value of the <code>input</code> attribute.</p> <p>If a problem occurs while retrieving the specified resource, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified web application resource.</p> String
input <p>If any arbitrary value for this attribute is specified, the resource will be made available as an <code>InputStream</code>. If this attribute is not specified, the resource will be made available as a <code>String</code>.</p> String
name* <p>Module-relative name (starting with a '/') of the web application resource to be loaded and made available.</p> String

<bean:size>

<p><strong> Define a bean containing the number of elements in a Collection or Map. </strong></p> <p>Given a reference to an array, Collection or Map, creates a new bean, of type <code>java.lang.Integer</code>, whose value is the number of elements in that collection. You can specify the collection to be counted in any one of the following ways:</p> <ul> <li>As a runtime expression specified as the value of the <code>collection</code> attribute.</li> <li>As a JSP bean specified by the <code>name</code> attribute.</li> <li>As the property, specified by the <code>property</code> attribute, of the JSP bean specified by the <code>name</code> attribute.</li> </ul>

Can contain: empty

Attributes

NameDescriptionType
collection <p>A runtime expression that evaluates to an array, a Collection, or a Map.</p> String
id* <p>The name of a page scope JSP bean, of type <code>java.lang.Integer</code>, that will be created to contain the size of the underlying collection being counted.</p> String
name <p>The name of the JSP bean (optionally constrained to the scope specified by the <code>scope</code> attribute) that contains the collection to be counted (if <code>property</code> is not specified), or whose property getter is called to return the collection to be counted (if <code>property</code> is specified.</p> String
property <p>The name of the property, of the bean specified by the <code>name</code> attribute, whose getter method will return the collection to be counted.</p> String
scope <p>The bean scope within which to search for the JSP bean specified by the <code>name</code> attribute. If not specified, the available scopes are searched in ascending sequence.</p> String

<bean:struts>

<p><strong> Expose a named Struts internal configuration object as a bean. </strong></p> <p>Retrieve the value of the specified Struts internal configuration object, and define it as a scripting variable and as a page scope attribute accessible to the remainder of the current page. You must specify exactly one of the <code>formBean</code>, <code>forward</code>, and <code>mapping</code> attributes to select the configuration object to be exposed.</p> <p>If a problem occurs while retrieving the specified configuration object, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
formBean <p>Specifies the name of the Struts <code>ActionFormBean</code> definition object to be exposed.</p> String
forward <p>Specifies the name of the global Struts <code>ActionForward</code> definition object to be exposed.</p> String
id* <p>Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified Struts internal configuration object.</p> String
mapping <p>Specifies the matching path of the Struts <code>ActionMapping</code> definition object to be exposed.</p> String

<bean:write>

<p><strong> Render the value of the specified bean property to the current JspWriter. </strong></p> <p>Retrieve the value of the specified bean property, and render it to the current JspWriter as a String by the ways:</p> <ul> <li>If <code>format</code> attribute exists then value will be formatted on base of format string from <code>format</code> attribute and default system locale.</li> <li>If in resources exists format string for value data type (view <code>format</code> attribute description) then value will be formatted on base of format string from resources. Resources bundle and target locale can be specified with <code>bundle</code> and <code>locale</code> attributes. If nothing specified then default resource bundle and current user locale will be used.</li> <li>If there is a PropertyEditor configured for the property value's class, the <code>getAsText()</code> method will be called.</li> <li>Otherwise, the usual <code>toString()</code> conversions will be applied.</li> </ul> <p>When a format string is provided, numeric values are formatted using the <code>java.text.DecimalFormat</code> class; if the format string came from a resource, the <code>applyLocalisedPattern()</code> method is used, and <code>applyPattern()</code> is used otherwise. Dates are formatted using the <code>SimpleDateFormat</code> class. For details of the specific format patterns, please see the Javadocs for those classes.</p> <p>If a problem occurs while retrieving the specified bean property, a request time exception will be thrown.</p>

Can contain: empty

Attributes

NameDescriptionType
bundle <p>The name of the application scope bean under which the <code>MessageResources</code> object containing our messages is stored.</p> String
filter <p>If this attribute is set to <code>true</code>, the rendered property value will be filtered for characters that are sensitive in HTML, and any such characters will be replaced by their entity equivalents.</p> boolean
format <p>Specifies the format string to use to convert bean or property value to the <code>String</code>. If nothing specified, then default format string for value data type will be searched in message resources by according key.</p> <!-- move to developers guide <table> <tr> <td>Key to search format string</td> <td>Data types</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.int</td> <td>java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Long, java.math.BigInteger</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.float</td> <td>java.lang.Float, java.lang.Double, java.math.BigDecimal</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.sql.timestamp</td> <td>java.sql.Timestamp</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.sql.date</td> <td>java.sql.Date</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.sql.time</td> <td>java.sql.Time</td> </tr> <tr> <td>org.apache.struts.taglib.bean.format.date</td> <td>java.util.Date</td> </tr> </table> <p>Default format strings in resources can be written as - <br /> <pre> org.apache.struts.taglib.bean.format.int=###### org.apache.struts.taglib.bean.format.float=######,#### org.apache.struts.taglib.bean.format.sql.timestamp=hh 'o''clock' a, zzzz org.apache.struts.taglib.bean.format.sql.date=EEE, MMM d, ''yy org.apache.struts.taglib.bean.format.sql.time=h:mm a org.apache.struts.taglib.bean.format.date=hh 'o''clock' a, zzzz </pre> <br />values for resource file entries are standart Java format strings for date, time and number values.</p> --> String
formatKey <p>Specifies the key to search format string in application resources.</p> String
ignore <p>If this attribute is set to <code>true</code>, and the bean specified by the <code>name</code> and <code>scope</code> attributes does not exist, simply return without writing anything. If this attribute is set to <code>false</code>, a runtime exception to be thrown, consistent with the other tags in this tag library.</p> boolean
locale <p>The name of the session scope bean under which our currently selected <code>Locale</code> object is stored.</p> String
name* <p>Specifies the attribute name of the bean whose property is accessed to retrieve the value specified by <code>property</code> (if specified). If <code>property</code> is not specified, the value of this bean itself will be rendered.</p> String
property <p>Specifies the name of the property to be accessed on the bean specified by <code>name</code>. This value may be a simple, indexed, or nested property reference expression. If not specified, the bean identified by <code>name</code> will itself be rendered. If the specified property returns null, no output will be rendered.</p> String
scope <p>Specifies the variable scope searched to retrieve the bean specified by <code>name</code>. If not specified, the default rules applied by <code>PageContext.findAttribute()</code> are applied.</p> String

html

<p> This taglib contains tags used to create struts input forms, as well as other tags generally useful in the creation of HTML-based user interfaces. </p> <p>Many of the tags in this tag library will throw a <code>JspException</code> at runtime when they are utilized incorrectly (such as when you specify an invalid combination of tag attributes). JSP allows you to declare an "error page" in the <code>&lt;%@ page %&gt;</code> directive. If you wish to process the actual exception that caused the problem, it is passed to the error page as a request attribute under key <code>org.apache.struts.action.EXCEPTION</code>.</p>

This is version 1.3.

  • base Render an HTML &lt;base&gt; Element Renders an HTML &lt;base&gt; element with an href attribute pointing to the absolute location of the enclosing JSP page
  • button Render A Button Input Field Renders an HTML &lt;input&gt; element of type button, populated from the specified value or the content of this tag body
  • cancel Render a Cancel Button Renders an HTML &lt;input&gt; element of type submit
  • checkbox Render A Checkbox Input Field Renders an HTML &lt;input&gt; element of type checkbox, populated from the specified value or the specified property of the bean associated with our current form
  • errors Conditionally display a set of accumulated error messages
  • file Render A File Select Input Field Renders an HTML &lt;input&gt; element of type file, defaulting to the specified value or the specified property of the bean associated with our current form
  • form Define An Input Form Renders an HTML &lt;form&gt; element whose contents are described by the body content of this tag
  • frame Render an HTML frame element Renders an HTML &lt;frame&gt; element with processing for the src attribute that is identical to that performed by the &lt;html:link&gt; tag for the href attribute
  • hidden Render A Hidden Field Renders an HTML &lt;input&gt; element of type hidden, populated from the specified value or the specified property of the bean associated with our current form
  • html Render an HTML &lt;html&gt; Element Renders an HTML &lt;html&gt; element with language attributes extracted from the user's current Locale object, if there is one
  • image Render an input tag of type "image" Renders an HTML &lt;input&gt; tag of type "image"
  • img Render an HTML img tag Renders an HTML &lt;img&gt; element with the image at the specified URL
  • javascript Render JavaScript validation based on the validation rules loaded by the ValidatorPlugIn
  • link Render an HTML anchor or hyperlink Renders an HTML &lt;a&gt; element as an anchor definition (if "linkName" is specified) or as a hyperlink to the specified URL
  • messages Conditionally display a set of accumulated messages
  • multibox Render A Checkbox Input Field Renders an HTML &lt;input&gt; element of type checkbox, whose "checked" status is initialized based on whether the specified value matches one of the elements of the underlying property's array of current values
  • option Render A Select Option Render an HTML &lt;option&gt; element, representing one of the choices for an enclosing &lt;select&gt; element
  • options Render a Collection of Select Options Renders a set of HTML &lt;option&gt; elements, representing possible choices for a &lt;select&gt; element
  • optionsCollection Render a Collection of Select Options Renders a set of HTML &lt;option&gt; elements, representing possible choices for a &lt;select&gt; element
  • param Adds a parameter to the following tags: &lt;html:frame&gt; &lt;html:link&gt; &lt;html:rewrite&gt; Since: Struts 1
  • password Render A Password Input Field Renders an HTML &lt;input&gt; element of type password, populated from the specified value or the specified property of the bean associated with our current form
  • radio Render A Radio Button Input Field Renders an HTML &lt;input&gt; element of type radio, populated from the specified property of the bean associated with our current form
  • reset Render A Reset Button Input Field Renders an HTML &lt;input&gt; element of type reset
  • rewrite Render an URI Renders a request URI based on exactly the same rules as the link tag does, but without creating the &lt;a&gt; hyperlink
  • select Render A Select Element Renders an HTML &lt;select&gt; element, associated with a bean property specified by our attributes
  • submit Render A Submit Button Renders an HTML &lt;input&gt; element of type submit
  • text Render An Input Field of Type text Render an input field of type text
  • textarea Render A Textarea Render a textarea element
  • xhtml Render HTML tags as XHTML Using this tag in a page tells all other html taglib tags to render themselves as XHTML 1
Required attributes are marked with a *

<html:base>

<p><strong>Render an HTML <code>&lt;base&gt;</code> Element</strong></p> <p>Renders an HTML <code>&lt;base&gt;</code> element with an <code>href</code> attribute pointing to the absolute location of the enclosing JSP page. This tag is valid only when nested inside an HTML <code>&lt;head&gt;</code> element.</p> <p>This tag is useful because it allows you to use relative URL references in the page that are calculated based on the URL of the page itself, rather than the URL to which the most recent submit took place (which is where the browser would normally resolve relative references against).</p>

Can contain: empty

Attributes

NameDescriptionType
ref <p>The reference from which the base uri will created. Possible values are: </p> <ul> <li><code>page</code> - The base uri will be the jsp page location. (default)</li> <li><code>site</code> - The base uri will be the application context path.</li> </ul> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3</dd></dl> String
server <p>The server name to use instead of request.getServerName().</p> String
target <p>The window target for this base reference.</p> String

<html:button>

<p><strong>Render A Button Input Field</strong></p> <p> Renders an HTML &lt;input&gt; element of type <code>button</code>, populated from the specified value or the content of this tag body. This tag is only valid when nested inside a form tag body. </p> <p> If a graphical button is needed (a button with an image), then the <a href="#image"><code>image</code></a> tag is more appropriate. </p>

Can contain:

Attributes

NameDescriptionType
accesskey <p>The keyboard character used to move focus immediately to this element.</p> String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle <p>The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled <p>Set to <code>true</code> if this input field should be disabled.</p> boolean
indexed <p>Valid only inside of <code>logic:iterate</code> tag. If <code>true</code> then name of the html tag will be rendered as "propertyName[34]". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag.</p> boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter. [Body of this tag (if any), or "Click"] String

<html:cancel>

<p><strong> Render a Cancel Button </strong></p> <p> Renders an HTML &lt;input&gt; element of type submit. This tag is only valid when nested inside a form tag body. Pressing of this submit button causes the action servlet to bypass calling the associated form bean validate() method. The action is called normally. </p>

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property Name of the request parameter that will be included with this submission, set to the specified value. <strong>WARNING</strong> - If you set this attribute to a value other than the default, this will <em>NOT</em> be recognized as the cancel key by the Struts controller servlet or the <code>Action.isCancelled()</code> method. You will need to do your own cancel detection. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter. [Body of this tag (if any), or "Cancel"] String

<html:checkbox>

<p><strong> Render A Checkbox Input Field </strong></p> <p>Renders an HTML &lt;input&gt; element of type <code>checkbox</code>, populated from the specified value or the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body.</p> <p><strong>NOTE</strong>: The underlying property value associated with this field should be of type <code>boolean</code>, and any <code>value</code> you specify should correspond to one of the Strings that indicate a true value ("true", "yes", or "on"). If you wish to utilize a set of related String values, consider using the <code>multibox</code> tag.</p> <p><strong>WARNING</strong>: In order to correctly recognize unchecked checkboxes, the <code>ActionForm</code> bean associated with this form must include a statement setting the corresponding boolean property to <code>false</code> in the <code>reset()</code> method.</p>

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of <code>logic:iterate</code> tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value The value to be transmitted if this checkbox is checked when the form is submitted. If not specified, the value "on" will be returned. String

<html:errors>

<p><strong> Conditionally display a set of accumulated error messages. </strong></p> <p>Displays a set of error messages prepared by a business logic component and stored as an <code>ActionMessages</code> object, an <code>ActionErrors</code> object, a String, or a String array in any scope. If such a bean is not found, nothing will be rendered.</p> <p>In order to use this tag successfully, you must have defined an application scope <code>MessageResources</code> bean under the default attribute name, with optional definitions of message keys specified in the following attributes:</p> <ul> <li><strong>header</strong> - Text that will be rendered before the error messages list. Typically, this message text will end with <code>&lt;ul&gt;</code> to start the error messages list (default "errors.header").</li> <li><strong>footer</strong> - Text that will be rendered after the error messages list. Typically, this message text will begin with <code>&lt;/ul&gt;</code> to end the error messages list (default "errors.footer").</li> <li><strong>prefix</strong> - Text that will be rendered before each individual error in the list (default "errors.prefix").</li> <li><strong>suffix</strong> - Text that will be rendered after each individual error in the list (default "errors.suffix").</li> </ul> <p>See the <code>messages</code> tag for an alternative to this tag that does not rely on HTML in your <code>MessageResources</code>.</p>

Can contain: empty

Attributes

NameDescriptionType
bundle The servlet context attribute key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. String
footer This value is an optional message resource key that will be printed after the iteration of error messages has finished. Defaults to "errors.footer" if not specified. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
header This value is an optional message resource key that will be printed before the iteration of error messages begins. Defaults to "errors.header" if not specified. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
locale The session attribute key for the Locale used to select messages to be displayed. If not specified, defaults to the Struts standard value. String
name Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used. String
prefix This value is an optional message resource key that will be printed before an error message. Defaults to "errors.prefix" if not specified. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
property Name of the property for which error messages should be displayed. If not specified, all error messages (regardless of property) are displayed. String
suffix This value is an optional message resource key that will be printed after an error message. Defaults to "errors.suffix" if not specified. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String

<html:file>

<p><strong> Render A File Select Input Field </strong></p> <p> Renders an HTML &lt;input&gt; element of type file, defaulting to the specified value or the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body. </p> <p> As with the corresponding HTML &lt;input&gt; element, the enclosing form element must specify "POST" for the <code>method</code> attribute, and "multipart/form-data" for the <code>enctype</code> attribute. For example: </p> <pre> &lt;html:form method="POST" enctype="multipart/form-data"&gt; &lt;html:file property="theFile" /&gt; &lt;/html:form&gt;</pre> <p> WARNING: In order to correctly recognize uploaded files, the ActionForm bean associated with this form must include a statement setting the corresponding org.apache.struts.upload.FormFile property to null in the reset() method. </p>

Can contain:

Attributes

NameDescriptionType
accept Comma-delimited set of content types that the server you submit to knows how to process. This list can be used by the client browser to limit the set of file options that is made available for selection. If not specified, no content type list will be sent. String
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of <code>logic:iterate</code> tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlength Maximum number of input characters to accept. This is ignored by most browsers. [No limit] String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
size Size of the file selection box to be displayed. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value <p> <strong>NOTE</strong>: When setting this to some value, whether intentional or as the result (for example) of validation errors forcing the user back to the original jsp, this value is ignored by most browsers (for security reasons). This means that your users will have to re-select any previously selected files when submitting the form. Opera web browser will prompt the user so they have a chance to abort the submit. </p> Value to which this field should be initialized. [Use the corresponding bean property value or body content (if any) if property is not specified] String

<html:form>

<p><strong> Define An Input Form </strong></p> <p> Renders an HTML &lt;form&gt; element whose contents are described by the body content of this tag. The form implicitly interacts with the specified request scope or session scope bean to populate the input fields with the current property values from the bean. </p> <p> The form bean is located, and created if necessary, based on the form bean specification for the associated <code>ActionMapping</code>. </p>

Can contain: JSP

Attributes

NameDescriptionType
acceptCharset The list of character encodings for input data that the server should accept. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.2</dd></dl> String
action <p>The URL to which this form will be submitted. This value is also used to select the ActionMapping we are assumed to be processing, from which we can identify the appropriate form bean and scope. If a value is not provided, the original URI (servletPath) for the request is used. </p> <p>If you are using extension mapping for selecting the controller servlet, this value should be equal to the <code>path</code> attribute of the corresponding <code>&lt;action&gt;</code> element, optionally followed by the correct extension suffix.</p> <p>If you are using path mapping to select the controller servlet, this value should be exactly equal to the <code>path</code> attribute of the corresponding <code>&lt;action&gt;</code> element.</p> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if the Form's input fields should be disabled. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> boolean
enctype The content encoding to be used to submit this form, if the method is POST. This must be set to "multipart/form-data" if you are using the file tag to enable file upload. If not specified, the browser default (normally "application/x-www-form-urlencoded") is used. String
focus The field name (among the fields on this form) to which initial focus will be assigned with a JavaScript function. If not specified, no special JavaScript for this purpose will be rendered. String
focusIndex If the focus field is a field array, such as a radio button group, you can specify the index in the array to receive focus. <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl> String
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
method The HTTP method that will be used to submit this request (GET, POST). [POST] String
onreset JavaScript event handler executed if the form is reset. String
onsubmit JavaScript event handler executed if the form is submitted. String
readonly Set to <code>true</code> if the Form's input fields should be read only. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> boolean
scriptLanguage The form's focus &lt;script&gt; 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. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2</dd></dl> boolean
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
target Window target to which this form is submitted, such as for use in framed presentations. String

<html:frame>

<p><strong>Render an HTML frame element</strong></p> <p>Renders an HTML <code>&lt;frame&gt;</code> element with processing for the <code>src</code> attribute that is identical to that performed by the <code>&lt;html:link&gt;</code> tag for the <code>href</code> attribute. URL rewriting will be applied automatically, to maintain session state in the absence of cookies.</p> <p>The base URL for this frame is calculated based on which of the following attributes you specify (you must specify exactly one of them):</p> <ul> <li><em>forward</em> - Use the value of this attribute as the name of a global <code>ActionForward</code> to be looked up, and use the module-relative or context-relative URI found there.</li> <li><em>href</em> - Use the value of this attribute unchanged. </li> <li><em>page</em> - Use the value of this attribute as a module-relative URI, and generate a server-relative URI by including the context path and application prefix.</li> <li><em>action</em> - Use the value of this attribute as the logical name of a global Action that contains the actual content-relative URI of the destination of this transfer.</li> </ul> <p>Normally, the hyperlink you specify with one of the attributes described in the previous paragraph will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can append one or more dynamically defined query parameters to the hyperlink -- specify a single parameter with the <code>paramId</code> attribute (and its associated attributes to select the value), or specify the <code>name</code> (and optional <code>property</code>) attributes to select a <code>java.util.Map</code> bean that contains one or more parameter ids and corresponding values. </p> <p>To specify a single parameter, use the <code>paramId</code> attribute to define the name of the request parameter to be submitted. To specify the corresponding value, use one of the following approaches:</p> <ul> <li><em>Specify only the <code>paramName</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>paramScope</code> attribute) must identify a value that can be converted to a String.</li> <li><em>Specify both the <code>paramName</code> and <code>paramProperty</code> attributes</em> - The specified property getter method will be called on the JSP bean identified by the <code>paramName</code> (and optional <code>paramScope</code>) attributes, in order to select a value that can be converted to a String.</li> </ul> <p>If you prefer to specify a <code>java.util.Map</code> that contains all of the request parameters to be added to the hyperlink, use one of the following techniques:</p> <ul> <li><em>Specify only the <code>name</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>scope</code> attribute) must identify a <code>java.util.Map</code> containing the parameters.</li> <li><em>Specify both <code>name</code> and <code>property</code> attributes</em> - The specified property getter method will be called on the bean identified by the <code>name</code> (and optional <code>scope</code>) attributes, in order to return the <code>java.util.Map</code> containing the parameters.</li> </ul> <p>As the <code>Map</code> is processed, the keys are assumed to be the names of query parameters to be appended to the hyperlink. The value associated with each key must be either a String or a String array representing the parameter value(s), or an object whose toString() method will be called. If a String array is specified, more than one value for the same query parameter name will be created.</p> <p>Additionally, you can request that the current transaction control token, if any, be included in the generated hyperlink by setting the <code>transaction</code> attribute to <code>true</code>. You can also request that an anchor ("#xxx") be added to the end of the URL that is created by any of the above mechanisms, by using the <code>anchor</code> attribute.</p>

Can contain: JSP

Attributes

NameDescriptionType
action <p>Logical name of a global <code>Action</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> <p>Additionally, you can specify a <code>module</code> prefix for linking to other modules.</p> String
anchor <p>Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value <strong>without</strong> any "#" character.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
forward <p>Logical name of a global <code>ActionForward</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
frameName <p>Value for the <code>name</code> attribute of the rendered <code>&lt;frame&gt;</code> element.</p> String
frameborder <p>Should a frame border be generated around this frame (1) or not (0)?</p> String
href <p>The URL to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
longdesc <p>URI of a long description of the frame. This description should supplement the short description provided by the <code>title</code> attribute, and may be particularly useful for non-visual user agents.</p> String
marginheight <p>The amount of space (in pixels) to be left between the frame's contents and its top and bottom margins.</p> String
marginwidth <p>The amount of space (in pixels) to be left between the frame's contents and its left and right margins.</p> String
module <p>Prefix name of a <code>Module</code> that contains the action mapping for the <code>Action</code> that is specified by the <code>action</code> attribute. You <strong>must</strong> specify an <code>action</code> attribute for this to have an effect.</p> <p><strong>Note: </strong>Use "" to map to the default module.</p> String
name <p>The name of a JSP bean that contains a <code>Map</code> representing the query parameters (if <code>property</code> is not specified), or a JSP bean whose property getter is called to return a <code>Map</code> (if <code>property</code> is specified).</p> String
noresize <p>Should users be disallowed from resizing the frame? (true, false).</p> boolean
page <p>The module-relative path (beginning with a "/" character) to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
paramId <p>The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the <code>paramName</code> and (optional) <code>paramProperty</code> attributes, optionally scoped by the <code>paramScope</code> attribute</p> String
paramName <p>The name of a JSP bean that is a String containing the value for the request parameter named by <code>paramId</code> (if <code>paramProperty</code> is not specified), or a JSP bean whose property getter is called to return a String (if <code>paramProperty</code> is specified). The JSP bean is constrained to the bean scope specified by the <code>paramScope</code> property, if it is specified.</p> String
paramProperty <p>The name of a property of the bean specified by the <code>paramName</code> attribute, whose return value must be a String containing the value of the request parameter (named by the <code>paramId</code> attribute) that will be dynamically added to this hyperlink.</p> String
paramScope <p>The scope within which to search for the bean specified by the <code>paramName</code> attribute. If not specified, all scopes are searched.</p> String
property <p>The name of a property of the bean specified by the <code>name</code> attribute, whose return value must be a <code>java.util.Map</code> containing the query parameters to be added to the hyperlink. You <strong>must</strong> specify the <code>name</code> attribute if you specify this attribute.</p> String
scope <p>The scope within which to search for the bean specified by the <code>name</code> attribute. If not specified, all scopes are searched.</p> String
scrolling <p>Should scroll bars be created unconditionally (yes), never (no), or only when needed (auto)?</p> String
style <p>CSS styles to be applied to this element.</p> String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
transaction <p>If set to <code>true</code>, any current transaction control token will be included in the generated hyperlink, so that it will pass an <code>isTokenValid()</code> test in the receiving Action.</p> boolean

<html:hidden>

<p><strong> Render A Hidden Field </strong></p> <p> Renders an HTML &lt;input&gt; element of type hidden, populated from the specified value or the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body. </p>

Can contain: empty

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
indexed Valid only inside of <code>logic:iterate</code> tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* 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. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value to which this field should be initialized. [Use the corresponding bean property value] String
write Should the value of this field also be rendered 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. boolean

<html:html>

<p><strong>Render an HTML <code>&lt;html&gt;</code> Element</strong></p> <p>Renders an HTML <code>&lt;html&gt;</code> element with language attributes extracted from the user's current Locale object, if there is one.</p>

Can contain: JSP

Attributes

NameDescriptionType
lang Renders a lang attribute with the locale stored in the user's session. If not found in the session, the language from the <code>Accept-Language</code> HTTP header is used. If still not found, the default language for the server is used. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2</dd></dl> boolean
xhtml <p>Set to <code>true</code> in order to render <code>xml:lang</code> and <code>xmlns</code> attributes on the generated <code>html</code> element. This also causes all other html tags to render as XHTML 1.0 (the &lt;html:xhtml/&gt; tag has a similar purpose). </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl> boolean

<html:image>

<p><strong> Render an input tag of type "image" </strong></p> <p>Renders an HTML <code>&lt;input&gt;</code> tag of type "image". The base URL for this image is calculated directly based on the value specified in the <code>src</code> or <code>page</code> attributes, or indirectly by looking up a message resource string based on the <code>srcKey</code> or <code>pageKey</code> attributes. You <strong>must</strong> specify exactly one of these attributes.</p> <p>If you would like to obtain the coordinates of the mouse click that submitted this request, see the information below on the <code>property</code> attribute.</p> <p>This tag is only valid when nested inside a form tag body.</p>

Can contain:

Attributes

NameDescriptionType
accesskey <p>The keyboard character used to move focus immediately to this element.</p> String
align <p>The alignment option for this image.</p> String
alt <p>The alternate text for this image.</p> String
altKey <p>The message resources key of the alternate text for this image.</p> String
border <p>The width (in pixels) of the border around this image.</p> String
bundle <p>The servlet context attribute key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.</p> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "propertyName[34]". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
locale <p>The session attribute key for the Locale used to select internationalized messages. If not specified, defaults to the Struts standard value.</p> String
module <p>Prefix name of a <code>Module</code> that the <code>page</code> or <code>pageKey</code> attributes relate to.</p> String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
page <p>The module-relative path of the image for this input tag.</p> String
pageKey <p>The key of the message resources string specifying the module-relative path of the image for this input tag.</p> String
property <p>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="").</p> String
src <p>The source URL of the image for this input tag.</p> String
srcKey <p>The key of the message resources string specifying the source URL of the image for this input tag.</p> String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value <p>The value that will be submitted if this image button is pressed.</p> String

<html:img>

<p><strong>Render an HTML img tag</strong></p> <p>Renders an HTML <code>&lt;img&gt;</code> element with the image at the specified URL. Like the link tag, URL rewriting will be applied automatically to the value specified in <code>src</code>, <code>page</code>, or <code>action</code> to maintain session state in the absence of cookies. This will allow dynamic generation of an image where the content displayed for this image will be taken from the attributes of this tag.</p> <p>The base URL for this image is calculated directly based on the value specified in <code>src</code>, <code>page</code>, or <code>action</code> or <code>page</code>, or indirectly by looking up a message resource string based on the <code>srcKey</code> or <code>pageKey</code> attributes. You <strong>must</strong> specify exactly one of these attributes.</p> <p>Normally, the <code>src</code>, <code>page</code>, or <code>action</code> that you specify will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can append one or more dynamically defined query parameters to the <code>src</code> URL -- specify a single parameter with the <code>paramId</code> attribute (at its associated attributes to select the value), or specify the <code>name</code> (and optional <code>property</code>) attributes to select a <code>java.util.Map</code> bean that contains one or more parameter ids and corresponding values.</p> <p>To specify a single parameter, use the <code>paramId</code> attribute to define the name of the request parameter to be submitted. To specify the corresponding value, use one of the following approaches:</p> <ul> <li><em>Specify only the <code>paramName</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>paramScope</code> attribute) must identify a value that can be converted to a String.</li> <li><em>Specify both the <code>paramName</code> and <code>paramProperty</code> attributes</em> - The specified property getter will be called on the JSP bean identified by the <code>paramName</code> (and optional <code>paramScope</code>) attributes, in order to select a value that can be converted to a String.</li> </ul> <p>If you prefer to specify a <code>java.util.Map</code> that contains all of the request parameters to be added to the hyperlink, use one of the following techniques:</p> <ul> <li><em>Specify only the <code>name</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>scope</code> attribute) must identify a <code>java.util.Map</code> containing the parameters.</li> <li><em>Specify both <code>name</code> and <code>property</code> attributes</em> - The specified property getter method will be called on the bean identified by the <code>name</code> (and optional <code>scope</code>) attributes, in order to return the <code>java.util.Map</code> containing the parameters.</li> </ul> <p>As the <code>Map</code> is processed, the keys are assumed to be the names of query parameters to be appended to the <code>src</code> URL. The value associated with each key must be either a String or a String array representing the parameter value(s), or an object whose toString() method will be called. If a String array is specified, more than one value for the same query parameter name will be created.</p> <p>You can specify the alternate text for this image (which most browsers display as pop-up text block when the user hovers the mouse over this image) either directly, through the <code>alt</code> attribute, or indirectly from a message resources bundle, using the <code>bundle</code> and <code>altKey</code> attributes.</p>

Can contain: empty

Attributes

NameDescriptionType
action <p>The action, starting with a slash, that will render the image to be displayed by this tag. The rendered URL for this image will automatically prepend the context path of this web application (in the same manner as the <code>action</code> attribute on the link tag works), in addition to any necessary URL rewriting. You <strong>must</strong> specify the <code>action</code>, <code>page</code> attribute or the <code>src</code> attribute.</p> <p>Additionally, you can specify a <code>module</code> prefix for linking to other modules.</p> String
align <p>Where the image is aligned to. Can be one of the following attributes:</p> <ul> <li>left - left justify, wrapping text on right</li> <li>right -right justify, wrapping test on left</li> <li>top - aligns the image with the top of the text on the same row</li> <li>middle - aligns the image's vertical center with the text base line</li> <li>bottom - aligns the image with the bottom of the text's base line</li> <li>texttop - aligns the image's top with that of the text font on the same line</li> <li>absmiddle - aligns the image's vertical center with the absolute center of the text</li> <li>absbottom - aligns the image with the absolute bottom of the text font on the same row</li> </ul> String
alt <p>And alternative text to be displayed in browsers that don't support graphics. Also used often as type of context help over images.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
border <p>The width of the border surrounding the image.</p> String
bundle <p>The servlet context attribute key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.</p> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
height <p>The height of the image being displayed. This parameter is very nice to specify (along with <code>width</code>) to help the browser render the page faster.</p> String
hspace <p>The amount of horizontal spacing between the icon and the text. The text may be in the same paragraph, or be wrapped around the image.</p> String
imageName <p>The scriptable name to be defined within this page, so that you can reference it with intra-page scripts. In other words, the value specified here will render a "name" element in the generated image tag.</p> String
ismap <p>The name of the server-side map that this image belongs to.</p> String
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
locale <p>The name of the request or session Locale attribute used to look up internationalized messages.</p> String
module <p>Prefix name of a <code>Module</code> that contains the action mapping for the <code>Action</code> that is specified by the <code>action</code> attribute. You <strong>must</strong> specify an <code>action</code> attribute for this to have an effect.</p> <p><strong>Note: </strong>Use "" to map to the default module.</p> String
name <p>The name of a JSP bean that contains a <code>Map</code> representing the query parameters (if <code>property</code> is not specified), or a JSP bean whose property getter is called to return a <code>Map</code> (if <code>property</code> is specified).</p> String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onkeydown <p>JavaScript event handler that is executed when this element receives a key down event.</p> String
onkeypress <p>JavaScript event handler that is executed when this element receives a key press event.</p> String
onkeyup <p>JavaScript event handler that is executed when this element receives a key up event.</p> String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
page <p>The module-relative path, starting with a slash, of the image to be displayed by this tag. The rendered URL for this image will automatically prepend the context path of this web application (in the same manner as the <code>page</code> attribute on the link tag works), in addition to any necessary URL rewriting. You <strong>must</strong> specify either the <code>page</code> attribute or the <code>src</code> attribute.</p> String
pageKey <p>The message key, in the message resources bundle named by the <code>bundle</code> attribute, of the String to be used as the module-relative path for this image.</p> String
paramId <p>The name of the request parameter that will be dynamically added to the generated src URL. The corresponding value is defined by the <code>paramName</code> and (optional) <code>paramProperty</code> attributes, optionally scoped by the <code>paramScope</code> attribute</p> String
paramName <p>The name of a JSP bean that is a String containing the value for the request parameter named by <code>paramId</code> (if <code>paramProperty</code> is not specified), or a JSP bean whose property getter is called to return a String (if <code>paramProperty</code> is specified). The JSP bean is constrained to the bean scope specified by the <code>paramScope</code> property, if it is specified.</p> String
paramProperty <p>The name of a property of the bean specified by the <code>paramName</code> attribute, whose return value must be a String containing the value of the request parameter (named by the <code>paramId</code> attribute) that will be dynamically added to this src URL.</p> String
paramScope <p>The scope within which to search for the bean specified by the <code>paramName</code> attribute. If not specified, all scopes are searched.</p> String
property <p>The name of a property of the bean specified by the <code>name</code> attribute, whose return value must be a <code>java.util.Map</code> containing the query parameters to be added to the src URL. You <strong>must</strong> specify the <code>name</code> attribute if you specify this attribute.</p> String
scope <p>The scope within which to search for the bean specified by the <code>name</code> attribute. If not specified, all scopes are searched.</p> String
src <p>The URL to which this image will be transferred from This image may be dynamically modified by the inclusion of query parameters, as described in the tag description. This value will be used unmodified (other than potential URL rewriting) as the value of the "src" attribute in the rendered tag. You <strong>must</strong> specify either the <code>page</code> attribute or the <code>src</code> attribute.</p> String
srcKey <p>The message key, in the message resources bundle named by the <code>bundle</code> attribute, of the String to be used as the URL of this image.</p> String
style <p>CSS styles to be applied to this element.</p> String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
useLocalEncoding <p>If set to <code>true</code>, 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.</p> boolean
usemap <p>The name of the map as defined within this page for mapping hot-spot areas of this image.</p> String
vspace <p>The amount of vertical spacing between the icon and the text, above and below.</p> String
width <p>The width of the image being displayed. This parameter is very nice to specify (along with <code>height</code>) to help the browser render the page faster.</p> String

<html:javascript>

<p><strong> Render JavaScript validation based on the validation rules loaded by the ValidatorPlugIn. </strong></p> <p> Render JavaScript validation based on the validation rules loaded by the <code>ValidatorPlugIn</code>. The set of validation rules that should be generated is based on the formName attribute passed in, which should match the name attribute of the form element in the xml file. </p> <p> The dynamicJavascript and staticJavascript attributes default to true, but if dynamicJavascript is set to <code>true</code> and staticJavascript is set to <code>false</code> then only the dynamic JavaScript will be rendered. If dynamicJavascript is set to <code>false</code> and staticJavascript is set to <code>true</code> then only the static JavaScript will be rendered which can then be put in separate JSP page so the browser can cache the static JavaScript. </p>

Can contain: empty

Attributes

NameDescriptionType
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
cdata <p> If set to "true" and XHTML has been enabled, the JavaScript will be wrapped in a CDATA section to prevent XML parsing. The default is "true" to comply with the W3C's recommendation. </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl> String
dynamicJavascript <p> Whether or not to render the dynamic JavaScript. Defaults to <code>true</code>. </p> String
formName <p> The key (form name) to retrieve a specific set of validation rules. If "dynamicJavascript" is set to <code>true</code> and formName is missing or is not recognized by the <code>ValidatorPlugIn</code>, a JspException will be thrown. </p> String
htmlComment <p> Whether or not to enclose the javascript with HTML comments. This attribute is ignored in XHTML mode because the script would be deleted by the XML parser. See the cdata attribute for details on hiding scripts from XML parsers. Defaults to <code>true</code>. </p> String
method <p> The alternate JavaScript method name to be used instead of the of the default. The default is 'validate' concatenated in front of the key (form name) passed in (ex: validateRegistrationForm). </p> String
page <p> The current page of a set of validation rules if the page attribute for the field element in the xml file is in use. </p> int
scriptLanguage The &lt;script&gt; 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. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2</dd></dl> boolean
src <p> The src attribute's value when defining the html script element. </p> String
staticJavascript <p> Whether or not to render the static JavaScript. Defaults to <code>true</code>. </p> String

<html:link>

<p><strong>Render an HTML anchor or hyperlink</strong></p> <p>Renders an HTML <code>&lt;a&gt;</code> element as an anchor definition (if "linkName" is specified) or as a hyperlink to the specified URL. URL rewriting will be applied automatically, to maintain session state in the absence of cookies. The content displayed for this hyperlink will be taken from the body of this tag.</p> <p>The base URL for this hyperlink is calculated based on which of the following attributes you specify (you must specify exactly one of them):</p> <ul> <li><em>forward</em> - Use the value of this attribute as the name of a global <code>ActionForward</code> to be looked up, and use the module-relative or context-relative URI found there. If the forward is module-relative then it must point to an action and NOT to a page.</li> <li><em>action</em> - Use the value of this attribute as the name of a <code>Action</code> to be looked up, and use the module-relative or context-relative URI found there.</li> <li><em>href</em> - Use the value of this attribute unchanged. </li> <li><em>page</em> - Use the value of this attribute as a module-relative URI, and generate a server-relative URI by including the context path and module prefix.</li> </ul> <p>Normally, the hyperlink you specify with one of the attributes described in the previous paragraph will be left unchanged (other than URL rewriting if necessary). However, there are three ways you can append one or more dynamically defined query parameters to the hyperlink -- specify a single parameter with the <code>paramId</code> attribute (and its associated attributes to select the value), or specify the <code>name</code> (and optional <code>property</code>) attributes to select a <code>java.util.Map</code> bean that contains one or more parameter ids and corresponding values, or nest one or more lt&;html:param&gt; tags in the tag body. </p> <p>To specify a single parameter, use the <code>paramId</code> attribute to define the name of the request parameter to be submitted. To specify the corresponding value, use one of the following approaches:</p> <ul> <li><em>Specify only the <code>paramName</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>paramScope</code> attribute) must identify a value that can be converted to a String.</li> <li><em>Specify both the <code>paramName</code> and <code>paramProperty</code> attributes</em> - The specified property getter method will be called on the JSP bean identified by the <code>paramName</code> (and optional <code>paramScope</code>) attributes, in order to select a value that can be converted to a String.</li> </ul> <p>If you prefer to specify a <code>java.util.Map</code> that contains all of the request parameters to be added to the hyperlink, use one of the following techniques:</p> <ul> <li><em>Specify only the <code>name</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>scope</code> attribute) must identify a <code>java.util.Map</code> containing the parameters.</li> <li><em>Specify both <code>name</code> and <code>property</code> attributes</em> - The specified property getter method will be called on the bean identified by the <code>name</code> (and optional <code>scope</code>) attributes, in order to return the <code>java.util.Map</code> containing the parameters.</li> </ul> <p>As the <code>Map</code> is processed, the keys are assumed to be the names of query parameters to be appended to the hyperlink. The value associated with each key must be either a String or a String array representing the parameter value(s), or an object whose toString() method will be called. If a String array is specified, more than one value for the same query parameter name will be created.</p> <p>Supplmenting these two methods, you can nest one or more lt&;html:param&gt; tags to dynamically add parameters in a logic-friendly way (such as executing a for loop that assigns the name/value pairs at runtime). This method does not compete with the aforementioned; it will adds its parameters <em>in addition</em> to whatever parameters are already specified.</p> <p>Additionally, you can request that the current transaction control token, if any, be included in the generated hyperlink by setting the <code>transaction</code> attribute to <code>true</code>. You can also request that an anchor ("#xxx") be added to the end of the URL that is created by any of the above mechanisms, by using the <code>anchor</code> attribute.</p>

Can contain: JSP

Attributes

NameDescriptionType
accesskey <p>The keyboard character used to move focus immediately to this element.</p> String
action <p>Logical name of a <code>Action</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> <p>Additionally, you can specify a <code>module</code> prefix for linking to other modules.</p> String
anchor <p>Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value <strong>without</strong> any "#" character.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
forward <p>Logical name of a global <code>ActionForward</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
href <p>The URL to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
indexId By this attribute different name for the indexed parameter can be specified. Take a look to the "indexed" attribute for details. String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then indexed parameter with name from indexId attribute will be added to the query string. Indexed parameter looks like "index[32]". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
linkName <p>The anchor name to be defined within this page, so that you can reference it with intra-page hyperlinks. In other words, the value specified here will render a "name" element in the generated anchor tag.</p> String
module <p>Prefix name of a <code>Module</code> that contains the action mapping for the <code>Action</code> that is specified by the <code>action</code> attribute. You <strong>must</strong> specify an <code>action</code> attribute for this to have an effect.</p> <p><strong>Note: </strong>Use "" to map to the default module.</p> String
name <p>The name of a JSP bean that contains a <code>Map</code> representing the query parameters (if <code>property</code> is not specified), or a JSP bean whose property getter is called to return a <code>Map</code> (if <code>property</code> is specified).</p> String
onblur <p>JavaScript event handler that is executed when this element loses input focus.</p> String
onclick <p>JavaScript event handler that is executed when this element receives a mouse click.</p> String
ondblclick <p>JavaScript event handler that is executed when this element receives a mouse double click.</p> String
onfocus <p>JavaScript event handler that is executed when this element receives input focus.</p> String
onkeydown <p>JavaScript event handler that is executed when this element receives a key down event.</p> String
onkeypress <p>JavaScript event handler that is executed when this element receives a key press event.</p> String
onkeyup <p>JavaScript event handler that is executed when this element receives a key up event.</p> String
onmousedown <p>JavaScript event handler that is executed when this element receives a mouse down event.</p> String
onmousemove <p>JavaScript event handler that is executed when this element receives a mouse move event.</p> String
onmouseout <p>JavaScript event handler that is executed when this element receives a mouse out event.</p> String
onmouseover <p>JavaScript event handler that is executed when this element receives a mouse over event.</p> String
onmouseup <p>JavaScript event handler that is executed when this element receives a mouse up event.</p> String
page <p>The module-relative path (beginning with a "/" character) to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
paramId <p>The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the <code>paramName</code> and (optional) <code>paramProperty</code> attributes, optionally scoped by the <code>paramScope</code> attribute</p> String
paramName <p>The name of a JSP bean that is a String containing the value for the request parameter named by <code>paramId</code> (if <code>paramProperty</code> is not specified), or a JSP bean whose property getter is called to return a String (if <code>paramProperty</code> is specified). The JSP bean is constrained to the bean scope specified by the <code>paramScope</code> property, if it is specified.</p> String
paramProperty <p>The name of a property of the bean specified by the <code>paramName</code> attribute, whose return value must be a String containing the value of the request parameter (named by the <code>paramId</code> attribute) that will be dynamically added to this hyperlink.</p> String
paramScope <p>The scope within which to search for the bean specified by the <code>paramName</code> attribute. If not specified, all scopes are searched.</p> String
property <p>The name of a property of the bean specified by the <code>name</code> attribute, whose return value must be a <code>java.util.Map</code> containing the query parameters to be added to the hyperlink. You <strong>must</strong> specify the <code>name</code> attribute if you specify this attribute.</p> String
scope <p>The scope within which to search for the bean specified by the <code>name</code> attribute. If not specified, all scopes are searched.</p> String
style <p>CSS styles to be applied to this element.</p> String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex <p>The tab order (ascending positive integers) for this element.</p> String
target <p>The window target in which the resource requested by this hyperlink will be displayed, for example in a framed presentation.</p> String
title <p>The advisory title for this hyperlink.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
transaction <p>If set to <code>true</code>, any current transaction control token will be included in the generated hyperlink, so that it will pass an <code>isTokenValid()</code> test in the receiving Action.</p> boolean
useLocalEncoding <p>If set to <code>true</code>, 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.</p> boolean

<html:messages>

<p><strong> Conditionally display a set of accumulated messages. </strong></p> <p>Displays a set of messages prepared by a business logic component and stored as an <code>ActionMessages</code> object, <code>ActionErrors</code> object, a String, or a String array in any scope. If such a bean is not found, nothing will be rendered. The messages are placed into the page scope in the body of this tag where they can be displayed by standard JSP methods. (For example: <code>&lt;bean:write&gt;</code>,<code>&lt;c:out&gt;</code>) </p> <p>In order to use this tag successfully, you must have defined an application scope <code>MessageResources</code> bean under the default attribute name.</p>

Can contain: JSP

Attributes

NameDescriptionType
bundle The servlet context attribute key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. String
footer This value is an optional message resource key that will be printed after the iteration of messages has finished. String
header This value is an optional message resource key that will be printed before the iteration of messages begins. String
id* The 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 <code>null</code>. String
locale The session attribute key for the Locale used to select messages to be displayed. If not specified, defaults to the Struts standard value. String
message By default the tag will retrieve the bean it will iterate over from the <code>Globals.ERROR_KEY</code> constant string, but if this attribute is set to 'true' the bean will be retrieved from the <code>Globals.MESSAGE_KEY</code> constant string. Also if this is set to 'true', any value assigned to the name attribute will be ignored. String
name Name of the bean in any scope under which our messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used. String
property Name of the property for which messages should be displayed. If not specified, all messages (regardless of property) are displayed. String

<html:multibox>

<p><strong> Render A Checkbox Input Field </strong></p> <p>Renders an HTML &lt;input&gt; element of type <code>checkbox</code>, whose "checked" status is initialized based on whether the specified value matches one of the elements of the underlying property's array of current values. This element is useful when you have large numbers of checkboxes, and prefer to combine the values into a single array-valued property instead of multiple boolean properties. This tag is only valid when nested inside a form tag body.</p> <p><strong>WARNING</strong>: In order to correctly recognize cases where none of the associated checkboxes are selected, the <code>ActionForm</code> bean associated with this form must include a statement setting the corresponding array to zero length in the <code>reset()</code> method.</p> <p>The value to be returned to the server, if this checkbox is selected, must be defined by one of the following methods:</p> <ul> <li>Specify a <code>value</code> attribute, whose contents will be used literally as the value to be returned.</li> <li>Specify no <code>value</code> attribute, and the nested body content of this tag will be used as the value to be returned.</li> </ul> <p> Also note that a map backed attribute cannot be used to hold a the String[] for a group of multibox tags. </p>

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value The value to be transmitted if this checkbox is checked when the form is submitted. String

<html:option>

<p><strong> Render A Select Option </strong></p> <p>Render an HTML <code>&lt;option&gt;</code> element, representing one of the choices for an enclosing <code>&lt;select&gt;</code> element. The text displayed to the user comes from either the body of this tag, or from a message string looked up based on the <code>bundle</code>, <code>locale</code>, and <code>key</code> attributes.</p> <p>If the value of the corresponding bean property matches the specified value, this option will be marked selected. This tag is only valid when nested inside a <code>&lt;html:select&gt;</code> tag body.</p>

Can contain:

Attributes

NameDescriptionType
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this option should be disabled. boolean
filter Set to <code>true</code> if you want the option label to be filtered for sensitive characters in HTML. By default, such a value is NOT filtered. boolean
key If specified, defines the message key to be looked up in the resource bundle specified by <code>bundle</code> for the text displayed to the user for this option. If not specified, the text to be displayed is taken from the body content of this tag. String
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
locale The session attributes key for the Locale instance to use for looking up the message specified by the <code>key</code> attribute. If not specified, uses the standard Struts session attribute name. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
value* Value to be submitted for this field if this option is selected by the user. String

<html:options>

<p><strong> Render a Collection of Select Options </strong></p> <p>Renders a set of HTML <code>&lt;option&gt;</code> elements, representing possible choices for a <code>&lt;select&gt;</code> element. This tag can be used multiple times within a single <code>&lt;html:select&gt;</code> element, either in conjunction with or instead of one or more <code>&lt;html:option&gt;</code> or <code>&lt;html:optionsCollection&gt;</code> elements.</p> <p>This tag operates in one of two major modes, depending on whether or not the <code>collection</code> attribute is specified. If the <code>collection</code> attribute is included, the following rules apply:</p> <ul> <li>The <strong>collection</strong> attribute is interpreted as the name of a JSP bean, in some scope, that itself represents a collection of individual beans, one per option value to be rendered.</li> <li>The <strong>property</strong> attribute is interpreted as the name of a property of the individual beans included in the collection, and is used to retrieve the value that will be returned to the server if this option is selected.</li> <li>The <strong>labelProperty</strong> attribute is interpreted as the name of a property of the individual beans included in the collection, and is used to retrieve the label that will be displayed to the user for this option. If the <code>labelProperty</code> attribute is not specified, the property named by the <code>property</code> attribute will be used to select both the value returned to the server and the label displayed to the user for this option.</li> </ul> <p>If the <code>collection</code> attribute is not specified, the rules described in the remainder of this section apply.</p> <p>The collection of values actually selected depends on the presence or absence of the <code>name</code> and <code>property</code> attributes. The following combinations are allowed:</p> <ul> <li><em>Only <code>name</code> is specified</em> - The value of this attribute is the name of a JSP bean in some scope that is the collection.</li> <li><em>Only <code>property</code> is specified</em> - The value of this attribute is the name of a property of the ActionForm bean associated with our form, which will return the collection.</li> <li><em>Both <code>name</code> and <code>property</code> are specified</em> - The value of the <code>name</code> attribute identifies a JSP bean in some scope. The value of the <code>property</code> attribute is the name of some property of that bean which will return the collection.</li> </ul> <p>The collection of labels displayed to the user can be the same as the option values themselves, or can be different, depending on the presence or absence of the <code>labelName</code> and <code>labelProperty</code> attributes. If this feature is used, the collection of labels must contain the same number of elements as the corresponding collection of values. The following combinations are allowed:</p> <ul> <li><em>Neither <code>labelName</code> nor <code>labelProperty</code> is specified</em> - The labels will be the same as the option values themselves.</li> <li><em>Only <code>labelName</code> is specified</em> - The value of this attribute is the name of a JSP bean in some scope that is the collection.</li> <li><em>Only <code>labelProperty</code> is specified</em> - The value of this attribute is the name of a property of the ActionForm bean associated with our form, which will return the collection.</li> <li><em>Both <code>labelName</code> and <code>labelProperty</code> are specified</em> - The value of the <code>labelName</code> attribute identifies a JSP bean in some scope. The value of the <code>labelProperty</code> attribute is the name of some property of that bean which will return the collection.</li> </ul> <p>Note that this tag does not support a <code>styleId</code> attribute, as it would have to apply the value to all the <code>option</code> elements created by this element, which would mean that more than one <code>id</code> element might have the same value, which the HTML specification says is illegal.</p>

Can contain: empty

Attributes

NameDescriptionType
collection Name of the JSP bean (in some scope) which is itself 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, respectively. String
filter Set to <code>false</code> if you do NOT want the option labels filtered for sensitive characters in HTML. By default, such values are filtered. boolean
labelName Name of the JSP bean (in some scope) containing the collection of labels to be displayed to the user for these options. String
labelProperty 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. String
name Name of the JSP bean (in some scope) containing the collection of values to be returned to the server for these options. If not specified, the form bean associated with our form is assumed. String
property Property of the form bean, or the bean specified by the name attribute, that will return the collection of values to returned to the server for these options. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String

<html:optionsCollection>

<p><strong> Render a Collection of Select Options </strong></p> <p>Renders a set of HTML <code>&lt;option&gt;</code> elements, representing possible choices for a <code>&lt;select&gt;</code> element. This tag can be used multiple times within a single <code>&lt;html:select&gt;</code> element, either in conjunction with or instead of one or more <code>&lt;html:option&gt;</code> or <code>&lt;html:options&gt;</code> elements.</p> <p>This tag operates on a collection of beans, where each bean has a <strong>label</strong> property and a <strong>value</strong> property. The actual names of these properties can be configured using the <code>label</code> and <code>value</code> attributes of this tag.</p> <p>This tag differs from the <code>&lt;html:options&gt;</code> tag in that it makes more consistent use of the <code>name</code> and <code>property</code> attributes, and allows the collection to be more easily obtained from the enclosing form bean.</p> <p>Note that this tag does not support a <code>styleId</code> attribute, as it would have to apply the value to all the <code>option</code> elements created by this element, which would mean that more than one <code>id</code> element might have the same value, which the HTML specification says is illegal.</p>

Can contain: empty

Attributes

NameDescriptionType
filter Set to <code>false</code> if you do NOT want the option labels filtered for sensitive characters in HTML. By default, such values are filtered. boolean
label The property of the bean within the collection which represents the label to be rendered for each option. Defaults to "label". String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
property The property of the form bean, or the bean specified by the name attribute, that will return the collection of objects to be rendered for these options. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
value The property of the bean within the collection which represents the value to be rendered for each option. Defaults to "value". String

<html:param>

<p>Adds a parameter to the following tags: <ol> <li><a href="#frame">&lt;html:frame&gt;</li> <li><a href="#link">&lt;html:link&gt;</li> <li><a href="#rewrite">&lt;html:rewrite&gt;</li> </ol> </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl>

Can contain:

Attributes

NameDescriptionType
name* <p>The String containing the name of the request parameter.</p> String
value <p>The value of the request parameter specified by the <code>name</code> attribute, whose return value must be a String or String[] that will be dynamically added to this hyperlink.</p> String

<html:password>

<p><strong> Render A Password Input Field </strong></p> Renders an HTML &lt;input&gt; element of type password, populated from the specified value or the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body.

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlength Maximum number of input characters to accept. [No limit] String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
readonly Set to <code>true</code> if this input field should be read only. boolean
redisplay Boolean flag indicating whether or not existing values will be redisplayed if they exist. Even though the redisplayed value will be shown as asterisks on the visible HTML page, the cleartext of the actual password value will be visible though the "Show Page Source" menu option of the client browser. You may wish to set this value to <code>false</code> on login pages. Defaults to <code>true</code> for consistency with all other form tags that redisplay their contents. boolean
size Number of character positions to allocate. [Browser default] String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value of the label to be placed on this button. This value will also be submitted as the value of the specified request parameter. [Body of this tag (if any)] String

<html:radio>

<p><strong> Render A Radio Button Input Field </strong></p> <p> Renders an HTML &lt;input&gt; element of type radio, populated from the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body. </p> <p> If an iterator is used to render a series of radio tags, the idName attribute may be used to specify the name of the bean exposed by the iterator. In this case, the value attribute is used as the name of a property on the idName bean that returns the value of the radio tag in this iteration. </p>

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
idName <p>Name of the bean (in some scope) that will return the value of the radio tag. Usually exposed by an iterator. When the idName attribute 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.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl> String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* The corresponding bean property for this radio tag. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value* The value of the radio tag. String

<html:reset>

<p><strong> Render A Reset Button Input Field </strong></p> Renders an HTML &lt;input&gt; element of type reset.

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property Name of the input field that will be generated. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value of the label to be placed on this button. [Body of this tag (if any), or "Reset"] String

<html:rewrite>

<p><strong>Render an URI</strong></p> <p>Renders a request URI based on exactly the same rules as the <code><a href="#link">link</a></code> tag does, but without creating the <code>&lt;a&gt;</code> hyperlink. This value is useful when you want to generate a string constant for use by a JavaScript procedure.</p>

Can contain: JSP

Attributes

NameDescriptionType
action <p>Logical name of a <code>Action</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> <p>Additionally, you can specify a <code>module</code> prefix for linking to other modules.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.0</dd></dl> String
anchor <p>Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value <strong>without</strong> any "#" character.</p> String
forward <p>Logical name of a global <code>ActionForward</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
href <p>The URL to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
module <p>Prefix name of a <code>Module</code> that contains the action mapping for the <code>Action</code> that is specified by the <code>action</code> attribute. You <strong>must</strong> specify an <code>action</code> attribute for this to have an effect.</p> <p><strong>Note: </strong>Use "" to map to the default module.</p> String
name <p>The name of a JSP bean that contains a <code>Map</code> representing the query parameters (if <code>property</code> is not specified), or a JSP bean whose property getter is called to return a <code>Map</code> (if <code>property</code> is specified).</p> String
page <p>The module-relative path (beginning with a "/" character) to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
paramId <p>The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the <code>paramName</code> and (optional) <code>paramProperty</code> attributes, optionally scoped by the <code>paramScope</code> attribute</p> String
paramName <p>The name of a JSP bean that is a String containing the value for the request parameter named by <code>paramId</code> (if <code>paramProperty</code> is not specified), or a JSP bean whose property getter is called to return a String (if <code>paramProperty</code> is specified). The JSP bean is constrained to the bean scope specified by the <code>paramScope</code> property, if it is specified.</p> String
paramProperty <p>The name of a property of the bean specified by the <code>paramName</code> attribute, whose return value must be a String containing the value of the request parameter (named by the <code>paramId</code> attribute) that will be dynamically added to this hyperlink.</p> String
paramScope <p>The scope within which to search for the bean specified by the <code>paramName</code> attribute. If not specified, all scopes are searched.</p> String
property <p>The name of a property of the bean specified by the <code>name</code> attribute, whose return value must be a <code>java.util.Map</code> containing the query parameters to be added to the hyperlink. You <strong>must</strong> specify the <code>name</code> attribute if you specify this attribute.</p> String
scope <p>The scope within which to search for the bean specified by the <code>name</code> attribute. If not specified, all scopes are searched.</p> String
transaction <p>If set to <code>true</code>, any current transaction control token will be included in the generated hyperlink, so that it will pass an <code>isTokenValid()</code> test in the receiving Action.</p> boolean
useLocalEncoding <p>If set to <code>true</code>, 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.</p> boolean

<html:select>

<p><strong> Render A Select Element </strong></p> <p>Renders an HTML &lt;select&gt; element, associated with a bean property specified by our attributes. This tag is only valid when nested inside a form tag body. </p> <p>This tag operates in two modes, depending upon the state of the <code>multiple</code> attribute, which affects the data type of the associated property you should use:</p> <ul> <li><em>multiple="true" IS NOT selected</em> - The corresponding property should be a scalar value of any supported data type.</li> <li><em>multiple="true" IS selected</em> - The corresponding property should be an array of any supported data type.</li> </ul> <p><strong>WARNING</strong>: In order to correctly recognize cases where no selection at all is made, the <code>ActionForm</code> bean associated with this form must include a statement resetting the scalar property to a default value (if <code>multiple</code> is not set), or the array property to zero length (if <code>multiple</code> is set) in the <code>reset()</code> method.</p>

Can contain: JSP

Attributes

NameDescriptionType
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
multiple If set to any arbitrary value, the rendered select element will support multiple selections. String
name The attribute name of the bean whose properties are consulted to determine which option should be pre-selected when rendering this input field. If not specified, the bean associated with the enclosing <code>&lt;html:form&gt;</code> tag is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property* Name of the request parameter that will be included with this submission, set to the specified value. String
size The number of available options displayed at one time. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value The value to compare with for marking an option selected. String

<html:submit>

<p><strong> Render A Submit Button </strong></p> Renders an HTML &lt;input&gt; element of type <code>submit</code>. <p> If a graphical button is needed (a button with an image), then the <a href="#image"><code>image</code></a> tag is more appropriate. </p>

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "propertyName[34]". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
property Name of the request parameter that will be included with this submission, set to the specified value. String
style CSS styles to be applied to this HTML element. String
styleClass CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). String
styleId Identifier to be assigned to this HTML element (renders an "id" attribute). String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value The value of the button label. String

<html:text>

<p><strong>Render An Input Field of Type text</strong></p> <p>Render an input field of type text. This tag is only valid when nested inside a form tag body.</p>

Can contain:

Attributes

NameDescriptionType
accesskey <p>The keyboard character used to move focus immediately to this element.</p> String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlength Maximum number of input characters to accept. [No limit] String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
onselect JavaScript event handler executed when a when a user selects some text in a text field. String
property* 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. String
readonly Set to <code>true</code> if this input field should be read only. boolean
size Number of character positions to allocate. [Browser default] String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value to which this field should be initialized. [Use the corresponding bean property value] String

<html:textarea>

<p><strong> Render A Textarea </strong></p> Render a textarea element. This tag is only valid when nested inside a form tag body.

Can contain:

Attributes

NameDescriptionType
accesskey The keyboard character used to move focus immediately to this element. String
alt <p>The alternate text for this element.</p> String
altKey <p>The message resources key of the alternate text for this element.</p> String
bundle The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet. <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
cols The number of columns to display. String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled Set to <code>true</code> if this input field should be disabled. boolean
errorKey <p>Name of the bean (in any scope) under which our error messages have been stored. If not present, the name specified by the <code>Globals.ERROR_KEY</code> constant string will be used.</p> <p><strong>N.B.</strong> This is used in conjunction with the <code>errorStyle</code>, <code>errorStyleClass</code> and <code>errorStyleId</code> attributes and should be set to the same value as the <code>name</code> attribute on the &lt;html:errors/&gt; tag.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <p>CSS styles to be applied to this HTML element if an error exists for it.</p> <p><strong>N.B.</strong> If present, this overrides the <code>style</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <p>CSS stylesheet class to be applied to this HTML element if an error exists for it (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleClass</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <p>Identifier to be assigned to this HTML element if an error exists for it (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, this overrides the <code>styleId</code> attribute in the event of an error.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexed Valid only inside of logic:iterate tag. If <code>true</code> then name of the html tag will be rendered as "id[34].propertyName". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. boolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
name The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. String
onblur JavaScript event handler executed when this element loses input focus. String
onchange JavaScript event handler executed when this element loses input focus and its value has changed. String
onclick JavaScript event handler executed when this element receives a mouse click. String
ondblclick JavaScript event handler executed when this element receives a mouse double click. String
onfocus JavaScript event handler executed when this element receives input focus. String
onkeydown JavaScript event handler executed when this element has focus and a key is depressed. String
onkeypress JavaScript event handler executed when this element has focus and a key is depressed and released. String
onkeyup JavaScript event handler executed when this element has focus and a key is released. String
onmousedown JavaScript event handler executed when this element is under the mouse pointer and a mouse button is depressed. String
onmousemove JavaScript event handler executed when this element is under the mouse pointer and the pointer is moved. String
onmouseout JavaScript event handler executed when this element was under the mouse pointer but the pointer was moved outside the element. String
onmouseover JavaScript event handler executed when this element was not under the mouse pointer but the pointer is moved inside the element. String
onmouseup JavaScript event handler executed when this element is under the mouse pointer and a mouse button is released. String
onselect JavaScript event handler executed when a when a user selects some text in a text field. String
property* 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. String
readonly Set to <code>true</code> if this input field should be read only. boolean
rows The number of rows to display. String
style <p>CSS styles to be applied to this HTML element.</p> <p><strong>N.B.</strong> If present, the <code>errorStyle</code> overrides this attribute in the event of an error for the element.</p> String
styleClass <p>CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleClass</code> overrides this attribute in the event of an error for the element.</p> String
styleId <p>Identifier to be assigned to this HTML element (renders an "id" attribute).</p> <p><strong>N.B.</strong> If present, the <code>errorStyleId</code> overrides this attribute in the event of an error for the element.</p> String
tabindex The tab order (ascending positive integers) for this element. String
title <p>The advisory title for this element.</p> String
titleKey <p>The message resources key for the advisory title for this element.</p> String
value Value to which this field should be initialized. [Use the corresponding bean property value] String

<html:xhtml>

<p><strong>Render HTML tags as XHTML</strong></p> <p> Using this tag in a page tells all other html taglib tags to render themselves as XHTML 1.0. This is useful when composing pages with JSP includes or Tiles. &lt;html:html xhtml="true"&gt; has a similar effect. This tag has no attributes; you use it like this: &lt;html:xhtml/&gt;. </p> <p> <strong>Note</strong>: Included pages do not inherit the rendering style of the including page. Each JSP fragment or Tile must use this tag to render as XHTML. </p>

Can contain: empty

This tag has no attributes.

logic

<p><strong>Note: Some of the features in this taglib are also available in the <a href="http://java.sun.com/products/jsp/jstl/">JavaServer Pages Standard Tag Library (JSTL)</a>. The Struts team encourages the use of the standard tags over the Struts specific tags when possible.</strong></p> <p>This tag library contains tags that are useful in managing conditional generation of output text, looping over object collections for repetitive generation of output text, and application flow management.</p> <p>For tags that do value comparisons (<code>equal</code>, <code>greaterEqual</code>, <code>greaterThan</code>, <code>lessEqual</code>, <code>lessThan</code>, <code>notEqual</code>), the following rules apply:</p> <ul> <li>The specified value is examined. If it can be converted successfully to a <code>double</code> or a <code>long</code>, it is assumed that the ultimate comparison will be numeric (either floating point or integer). Otherwise, a String comparison will be performed.</li> <li>The variable to be compared to is retrieved, based on the selector attribute(s) (<code>cookie</code>, <code>header</code>, <code>name</code>, <code>parameter</code>, <code>property</code>) present on this tag. It will be converted to the appropriate type for the comparison, as determined above.</li> <li>If the specified variable or property returns null, it will be coerced to a zero-length string before the comparison occurs.</li> <li>The specific comparison for this tag will be performed, and the nested body content of this tag will be evaluated if the comparison returns a <code>true</code> result.</li> </ul> <p>For tags that do substring matching (<code>match</code>, <code>notMatch</code>), the following rules apply:</p> <ul> <li>The specified variable is retrieved, based on the selector attribute(s) (<code>cookie</code>, <code>header</code>, <code>name</code>, <code>parameter</code>, <code>property</code>) present on this tag. The variable is converted to a String, if necessary.</li> <li>A request time exception will be thrown if the specified variable cannot be retrieved, or has a null value.</li> <li>The specified value is checked for existence as a substring of the variable, in the position specified by the <code>location</code> attribute, as follows: at the beginning (if location is set to <code>start</code>), at the end (if location is set to <code>end</code>), or anywhere (if location is not specified).</li> </ul> <p>Many of the tags in this tag library will throw a <code>JspException</code> at runtime when they are utilized incorrectly (such as when you specify an invalid combination of tag attributes). JSP allows you to declare an "error page" in the <code>&lt;%@ page %&gt;</code> directive. If you wish to process the actual exception that caused the problem, it is passed to the error page as a request attribute under key <code>org.apache.struts.action.EXCEPTION</code>.</p>

This is version 1.3.

  • empty Evaluate the nested body content of this tag if the requested variable is either null or an empty string
  • equal Evaluate the nested body content of this tag if the requested variable is equal to the specified value
  • forward Forward control to the page specified by the specified ActionForward entry
  • greaterEqual Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value
  • greaterThan Evaluate the nested body content of this tag if the requested variable is greater than the specified value
  • iterate Repeat the nested body content of this tag over a specified collection
  • lessEqual Evaluate the nested body content of this tag if the requested variable is less than or equal to the specified value
  • lessThan Evaluate the nested body content of this tag if the requested variable is less than the specified value
  • match Evaluate the nested body content of this tag if the specified value is an appropriate substring of the requested variable
  • messagesNotPresent Generate the nested body content of this tag if the specified message is not present in any scope
  • messagesPresent Generate the nested body content of this tag if the specified message is present in any scope
  • notEmpty Evaluate the nested body content of this tag if the requested variable is neither null, nor an empty string, nor an empty java
  • notEqual Evaluate the nested body content of this tag if the requested variable is not equal to the specified value
  • notMatch Evaluate the nested body content of this tag if the specified value is not an appropriate substring of the requested variable
  • notPresent Generate the nested body content of this tag if the specified value is not present in this request
  • present Generate the nested body content of this tag if the specified value is present in this request
  • redirect Render an HTTP Redirect Performs an HttpServletResponse
Required attributes are marked with a *

<logic:empty>

<p><strong> Evaluate the nested body content of this tag if the requested variable is either null or an empty string. </strong></p> <p>This tag evaluates its nested body content only if the specified value is either absent (i.e. <code>null</code>), an empty string (i.e. a <code>java.lang.String</code> with a length of zero), or an empty <code>java.util.Collection</code> or <code>java.util.Map</code> (tested by the .isEmpty() method on the respective interface).</p> <p> <strong>JSTL</strong>: The equivalent JSTL tag is &lt;c:if&gt; using the <code>empty</code> operator. For example, <br/> <code> &lt;c:if test="${empty sessionScope.myBean.myProperty}"&gt; do something &lt;/c:if&gt; </code> </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl>

Can contain: JSP

Attributes

NameDescriptionType
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String

<logic:equal>

<p><strong> Evaluate the nested body content of this tag if the requested variable is equal to the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are <strong>equal</strong>. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:forward>

<p><strong> Forward control to the page specified by the specified ActionForward entry. </strong></p> <p>Performs a <code>PageContext.forward()</code> or <code>HttpServletResponse.sendRedirect()</code> call for the global <code>ActionForward</code> entry for the specified name. URL rewriting will occur automatically if a redirect is performed.</p>

Can contain: empty

Attributes

NameDescriptionType
name* <p> The logical name of the global <code>ActionForward</code> entry that identifies the destination, and forwarding approach, to be used. <strong>Note</strong>: forwarding to Tiles definitions is not supported from this tag. You should forward to them from an Action subclass. </p> String

<logic:greaterEqual>

<p><strong> Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable is <strong>greater than or equal</strong> to the value.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:greaterThan>

<p><strong> Evaluate the nested body content of this tag if the requested variable is greater than the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable is <strong>greater than</strong> the value.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:iterate>

<p><strong> Repeat the nested body content of this tag over a specified collection. </strong></p> <p>Repeats the nested body content of this tag once for every element of the specified collection, which must be an <code>Iterator</code>, a <code>Collection</code>, a <code>Map</code> (whose values are to be iterated over), or an array. The collection to be iterated over must be specified in one of the following ways:</p> <ul> <li>As a runtime expression specified as the value of the <code>collection</code> attribute.</li> <li>As a JSP bean specified by the <code>name</code> attribute.</li> <li>As the property, specified by the <code>property</code>, of the JSP bean specified by the <code>name</code> attribute.</li> </ul> <p>The collection to be iterated over MUST conform to one of the following requirements in order for iteration to be successful:</p> <ul> <li>An array of Java objects or primitives.</li> <li>An implementation of <code>java.util.Collection</code>, including <code>ArrayList</code> and <code>Vector</code>.</li> <li>An implementation of <code>java.util.Enumeration</code>.</li> <li>An implementation of <code>java.util.Iterator</code>.</li> <li>An implementation of <code>java.util.Map</code>, including <code>HashMap</code>, <code>Hashtable</code>, and <code>TreeMap</code>. <strong>NOTE</strong> - See below for additional information about accessing Maps.</li> </ul> <p>Normally, each object exposed by the iterate tag is an element of the underlying collection you are iterating over. However, if you iterate over a <code>Map</code>, the exposed object is of type <code>Map.Entry</code> that has two properties:</p> <ul> <li><code>key</code> - The key under which this item is stored in the underlying Map.</li> <li><code>value</code> - The value that corresponds to this key.</li> </ul> <p>So, if you wish to iterate over the values of a Hashtable, you would implement code like the following:</p> <code> &lt;logic:iterate id="element" name="myhashtable"&gt;<br/> Next element is &lt;bean:write name="element" property="value"/&gt;<br/> &lt;/logic:iterate&gt; </code> <p>If the collection you are iterating over can contain <code>null</code> values, the loop will still be performed but no page scope attribute (named by the <code>id</code> attribute) will be created for that loop iteration. You can use the <code>&lt;logic:present&gt;</code> and <code>&lt;logic:notPresent&gt;</code> tags to test for this case.</p>

Can contain: JSP

Attributes

NameDescriptionType
collection <p>A runtime expression that evaluates to a collection (conforming to the requirements listed above) to be iterated over.</p> String
id* <p>The name of a page scope JSP bean that will contain the current element of the collection on each iteration, if it is not <code>null</code>.</p> String
indexId <p>The name of a page scope JSP bean that will contain the current index of the collection on each iteration.</p> String
length <p>The maximum number of entries (from the underlying collection) to be iterated through on this page. This can be either an integer that directly expresses the desired value, or the name of a JSP bean (in any scope) of type <code>java.lang.Integer</code> that defines the desired value. If not present, there will be no limit on the number of iterations performed.</p> String
name <p>The name of the JSP bean containing the collection to be iterated (if <code>property</code> is not specified), or the JSP bean whose property getter returns the collection to be iterated (if <code>property</code> is specified).</p> String
offset <p>The zero-relative index of the starting point at which entries from the underlying collection will be iterated through. This can be either an integer that directly expresses the desired value, or the name of a JSP bean (in any scope) of type <code>java.lang.Integer</code> that defines the desired value. If not present, zero is assumed (meaning that the collection will be iterated from the beginning.</p> String
property <p>Name of the property, of the JSP bean specified by <code>name</code>, whose getter returns the collection to be iterated.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
type <p>Fully qualified Java class name of the element to be exposed through the JSP bean named from the <code>id</code> attribute. If not present, no type conversions will be performed. NOTE: The actual elements of the collection must be assignment-compatible with this class, or a request time ClassCastException will occur.</p> String

<logic:lessEqual>

<p><strong> Evaluate the nested body content of this tag if the requested variable is less than or equal to the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable is <strong>less than or equal</strong> to the value.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:lessThan>

<p><strong> Evaluate the nested body content of this tag if the requested variable is less than the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable is <strong>less than</strong> the value.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:match>

<p><strong> Evaluate the nested body content of this tag if the specified value is an appropriate substring of the requested variable. </strong></p> <p>Matches the variable specified by one of the selector attributes (as a String) against the specified constant value. If the value is a substring (appropriately limited by the <code>location</code> attribute), the nested body content of this tag is evaluated.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be matched is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be matched is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
location <p>If not specified, a match between the variable and the value may occur at any position within the variable string. If specified, the match must occur at the specified location (either <code>start</code> or <code>end</code>) of the variable string.</p> String
name <p>The variable to be matched is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be matched is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be matched is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value which is checked for existence as a substring of the specified variable.</p> String

<logic:messagesNotPresent>

<p><strong> Generate the nested body content of this tag if the specified message is not present in any scope. </strong></p> <p>Evaluates the nested body content of this tag if an <code>ActionMessages</code> object, <code>ActionErrors</code> object, a String, or a String array is not present in any scope. If such a bean is found, nothing will be rendered. </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl>

Can contain: JSP

Attributes

NameDescriptionType
message <p>By default the tag will retrieve the bean it will iterate over from the <code>Globals.ERROR_KEY</code> constant string, but if this attribute is set to 'true' the bean will be retrieved from the <code>Globals.MESSAGE_KEY</code> constant string. Also if this is set to 'true', any value assigned to the name attribute will be ignored. </p> String
name <p>The parameter key used to retrieve the message from page, request, session or application scope.</p> String
property <p>Name of the property for which messages should be retrieved. If not specified, all messages (regardless of property) are retrieved. </p> String

<logic:messagesPresent>

<p><strong> Generate the nested body content of this tag if the specified message is present in any scope. </strong></p> <p>Evaluates the nested body content of this tag if an <code>ActionMessages</code> object, <code>ActionErrors</code> object, a String, or a String array is present in any scope. If such a bean is not found, nothing will be rendered. </p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.1</dd></dl>

Can contain: JSP

Attributes

NameDescriptionType
message <p>By default the tag will retrieve the bean it will iterate over from the <code>Globals.ERROR_KEY</code> constant string, but if this attribute is set to 'true' the bean will be retrieved from the <code>Globals.MESSAGE_KEY</code> constant string. Also if this is set to 'true', any value assigned to the name attribute will be ignored. </p> String
name <p>The parameter key used to retrieve the message from page, request, session, or application scope.</p> String
property <p>Name of the property for which messages should be retrieved. If not specified, all messages (regardless of property) are retrieved. </p> String

<logic:notEmpty>

<p><strong> Evaluate the nested body content of this tag if the requested variable is neither null, nor an empty string, nor an empty java.util.Collection (tested by the .isEmpty() method on the java.util.Collection interface). </strong></p> <p>This tag evaluates its nested body content only if the specified value is present (i.e. not <code>null</code>) and is not an empty string (i.e. a <code>java.lang.String</code> with a length of zero).</p> <p> <strong>JSTL</strong>: The equivalent JSTL tag is &lt;c:if&gt; using the <code>! empty</code> operator. For example, <br/> <code> &lt;c:if test="${ ! empty sessionScope.myBean.myProperty}"&gt; do something &lt;/c:if&gt; </code> </p>

Can contain: JSP

Attributes

NameDescriptionType
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String

<logic:notEqual>

<p><strong> Evaluate the nested body content of this tag if the requested variable is not equal to the specified value. </strong></p> <p>Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are <strong>not equal</strong>. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be compared is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
name <p>The variable to be compared is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be compared is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be compared is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value to which the variable, specified by other attribute(s) of this tag, will be compared.</p> String

<logic:notMatch>

<p><strong> Evaluate the nested body content of this tag if the specified value is not an appropriate substring of the requested variable. </strong></p> <p>Matches the variable specified by one of the selector attributes (as a String) against the specified constant value. If the value is not a substring (appropriately limited by the <code>location</code> attribute), the nested body content of this tag is evaluated.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>The variable to be matched is the value of the cookie whose name is specified by this attribute.</p> String
header <p>The variable to be matched is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner.</p> String
location <p>If not specified, a match between the variable and the value may occur at any position within the variable string. If specified, the match must occur at the specified location (either <code>start</code> or <code>end</code>) of the variable string.</p> String
name <p>The variable to be matched is the JSP bean specified by this attribute, if <code>property</code> is not specified, or the value of the specified property of this bean, if <code>property</code> is specified.</p> String
parameter <p>The variable to be matched is the first, or only, value of the request parameter specified by this attribute.</p> String
property <p>The variable to be matched is the property (of the bean specified by the <code>name</code> attribute) specified by this attribute. The property reference can be simple, nested, and/or indexed.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
value* <p>The constant value which is checked for existence as a substring of the specified variable.</p> String

<logic:notPresent>

<p><strong> Generate the nested body content of this tag if the specified value is not present in this request. </strong></p> <p>Depending on which attribute is specified, this tag checks the current request, and evaluates the nested body content of this tag only if the specified value <strong>is not</strong> present. Only one of the attributes may be used in one occurrence of this tag, unless you use the <code>property</code> attribute, in which case the <code>name</code> attribute is also required.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>Checks for the existence of a cookie with the specified name.</p> String
header <p>Checks for the existence of an HTTP header with the specified name. The name match is performed in a case insensitive manner.</p> String
name <p>Checks for the existence of a JSP bean, in any scope, with the specified name. If <code>property</code> is also specified, checks for a non-null property value for the specified property.</p> String
parameter <p>Checks for the existence of at least one occurrence of the specified request parameter on this request, even if the parameter value is a zero-length string.</p> String
property <p>Checks for the existence of a non-null property value, returned by a property getter method on the JSP bean (in any scope) that is specified by the <code>name</code> attribute. Property references can be simple, nested, and/or indexed.</p> String
role <p>Checks whether the currently authenticated user (if any) has been associated with the specified security role.</p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
user <p>Checks whether the currently authenticated user principal has the specified name.</p> String

<logic:present>

<p><strong> Generate the nested body content of this tag if the specified value is present in this request. </strong></p> <p>Depending on which attribute is specified, this tag checks the current request, and evaluates the nested body content of this tag only if the specified value <strong>is</strong> present. Only one of the attributes may be used in one occurrence of this tag, unless you use the <code>property</code> attribute, in which case the <code>name</code> attribute is also required.</p>

Can contain: JSP

Attributes

NameDescriptionType
cookie <p>Checks for the existence of a cookie with the specified name.</p> String
header <p>Checks for the existence of an HTTP header with the specified name. The name match is performed in a case insensitive manner.</p> String
name <p>Checks for the existence of a JSP bean, in any scope, with the specified name. If <code>property</code> is also specified, checks for a non-null property value for the specified property.</p> String
parameter <p>Checks for the existence of at least one occurrence of the specified request parameter on this request, even if the parameter value is a zero-length string.</p> String
property <p>Checks for the existence of a non-null property value, returned by a property getter method on the JSP bean (in any scope) that is specified by the <code>name</code> attribute. Property references can be simple, nested, and/or indexed.</p> String
role <p>Checks whether the currently authenticated user (if any) has been associated with any of the specified security roles. Use a comma-delimited list to check for multiple roles. Example: <code>&lt;logic:present role="role1,role2,role3"&gt; code..... &lt;/logic:present&gt;</code></p> String
scope <p>The bean scope within which to search for the bean named by the <code>name</code> property, or "any scope" if not specified.</p> String
user <p>Checks whether the currently authenticated user principal has the specified name.</p> String

<logic:redirect>

<p><strong>Render an HTTP Redirect</strong></p> <p>Performs an <code>HttpServletResponse.sendRedirect()</code> call to the hyperlink specified by the attributes to this tag. URL rewriting will be applied automatically, to maintain session state in the absence of cookies.</p> <p>The base URL for this redirect is calculated based on which of the following attributes you specify (you must specify exactly one of them):</p> <ul> <li><em>forward</em> - Use the value of this attribute as the name of a global <code>ActionForward</code> to be looked up, and use the module-relative or context-relative URI found there.</li> <li><em>href</em> - Use the value of this attribute unchanged. </li> <li><em>page</em> - Use the value of this attribute as an module-relative URI, and generate a server-relative URI by including the context path.</li> </ul> <p>Normally, the redirect you specify with one of the attributes described in the previous paragraph will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can append one or more dynamically defined query parameters to the hyperlink -- specify a single parameter with the <code>paramId</code> attribute (and its associated attributes to select the value), or specify the <code>name</code> (and optional <code>property</code>) attributes to select a <code>java.util.Map</code> bean that contains one or more parameter ids and corresponding values. </p> <p>To specify a single parameter, use the <code>paramId</code> attribute to define the name of the request parameter to be submitted. To specify the corresponding value, use one of the following approaches:</p> <ul> <li><em>Specify only the <code>paramName</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>paramScope</code> attribute) must identify a value that can be converted to a String.</li> <li><em>Specify both the <code>paramName</code> and <code>paramProperty</code> attributes</em> - The specified property getter method will be called on the JSP bean identified by the <code>paramName</code> (and optional <code>paramScope</code>) attributes, in order to select a value that can be converted to a String.</li> </ul> <p>If you prefer to specify a <code>java.util.Map</code> that contains all of the request parameters to be added to the hyperlink, use one of the following techniques:</p> <ul> <li><em>Specify only the <code>name</code> attribute</em> - The named JSP bean (optionally scoped by the value of the <code>scope</code> attribute) must identify a <code>java.util.Map</code> containing the parameters.</li> <li><em>Specify both <code>name</code> and <code>property</code> attributes</em> - The specified property getter method will be called on the bean identified by the <code>name</code> (and optional <code>scope</code>) attributes, in order to return the <code>java.util.Map</code> containing the parameters.</li> </ul> <p>As the <code>Map</code> is processed, the keys are assumed to be the names of query parameters to be appended to the hyperlink. The value associated with each key must be either a String or a String array representing the parameter value(s). If a String array is specified, more than one value for the same query parameter name will be created.</p>

Can contain:

Attributes

NameDescriptionType
action <p>Logical name of a global <code>Action</code> that contains the actual content-relative URI of the destination of this transfer. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>action</code> attribute, the <code>forward</code> attribute, the <code>href</code> attribute, or the <code>page</code> attribute.</p> String
anchor <p>Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value <strong>without</strong> any "#" character.</p> String
forward <p>Logical name of a global <code>ActionForward</code> that contains the actual content-relative URI of the destination of this redirect. This URI may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
href <p>The URL to which this redirect will transfer control. This URL may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
name <p>The name of a JSP bean that contains a <code>Map</code> representing the query parameters (if <code>property</code> is not specified), or a JSP bean whose property getter is called to return a <code>Map</code> (if <code>property</code> is specified).</p> String
page <p>The context-relative path (beginning with a "/" character) to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You <strong>must</strong> specify exactly one of the <code>forward</code> attribute, the <code>href</code> attribute, the <code>linkName</code> attribute, or the <code>page</code> attribute.</p> String
paramId <p>The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the <code>paramName</code> and (optional) <code>paramProperty</code> attributes, optionally scoped by the <code>paramScope</code> attribute</p> String
paramName <p>The name of a JSP bean that is a String containing the value for the request parameter named by <code>paramId</code> (if <code>paramProperty</code> is not specified), or a JSP bean whose property getter is called to return a String (if <code>paramProperty</code> is specified). The JSP bean is constrained to the bean scope specified by the <code>paramScope</code> property, if it is specified.</p> String
paramProperty <p>The name of a property of the bean specified by the <code>paramName</code> attribute, whose return value must be a String containing the value of the request parameter (named by the <code>paramId</code> attribute) that will be dynamically added to this hyperlink.</p> String
paramScope <p>The scope within which to search for the bean specified by the <code>paramName</code> attribute. If not specified, all scopes are searched.</p> String
property <p>The name of a property of the bean specified by the <code>name</code> attribute, whose return value must be a <code>java.util.Map</code> containing the query parameters to be added to the hyperlink. You <strong>must</strong> specify the <code>name</code> attribute if you specify this attribute.</p> String
scope <p>The scope within which to search for the bean specified by the <code>name</code> attribute. If not specified, all scopes are searched.</p> String
transaction <p>Set to <code>true</code> if you want the current transaction control token included in the generated URL for this redirect.</p> boolean
useLocalEncoding <p>If set to <code>true</code>, 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.</p> boolean

nested

<p>[Since Struts 1.1]</p> <p>This tag library brings a nested context to the functionality of the Struts custom tag library.</p> <p>It's written in a layer that extends the current Struts tags, building on their logic and functionality. The layer enables the tags to be aware of the tags which surround them so they can correctly provide the nesting property reference to the Struts system. </p> <p><strong>It's all about nesting beans...</strong><br /> A bean holds a reference to another bean internally, and all access to that bean is handled through the current bean. This act of having one bean's access go through another bean is known as "nesting beans". The first bean is known as the parent bean. The bean which it references, is known as a child bean. The terms "parent" and "child" are commonly used to describe the model's hierarchy. </p> <p><strong>A simple example... </strong><br /> Take an object which represents a monkey. The monkey's job is to pick bunches of bananas. On each bunch picked hangs many bananas. If this case was translated to bean objects, the monkey object would have a reference to the bunch objects he picked, and each bunch object would hold a reference to the bananas hanging in the bunch. </p> <p><strong>To describe this... </strong><br /> The monkey object is the parent to the bunch object, and the bunch object is a child of the monkey object. The bunch object is parent to its child banana objects, and the child banana objects children of the bunch object. The monkey is higher in the hierarchy than the bananas, and the bananas lower in the hierarchy to the bunches. </p> <p>One special term to remember is for the most parent class, which is known as the "root" object which starts the hierarchy.</p> <p>Nested tags are all about efficiently managing this style of hierarchy structure within your JSP markup.</p> <p> <strong>Important Note:</strong> Nearly all these tags extend tags from other libraries to bring their functionality into the nested context. Nesting relies on the tags working against the one bean model, and managing the properties so that they become relative to the properties they are nested within. In doing so, the tags will set the "name" attribute internally (where applicable), and in many cases will rely on the "property" attribute being set so it can be updated internally to become nested. The original tags on occasion provide options that don't use the "name" and "property" attributes. These uses will then fall outside the nested context, and will most likely cause error. To take advantage of these options, markup using the original tag for these cases. For an example see the <a href="options.html"><code>&lt;nested:options&gt;</code></a> tag. </p>

This is version 1.3.

  • checkbox Nested Extension - Render A Checkbox Input Field This tag is an extension of the <a href="
  • define Nested Extension - Define a scripting variable based on the value(s) of the specified bean property
  • empty Nested Extension - Evaluate the nested body content of this tag if the requested variable is either null or an empty string
  • equal Nested Extension - Evaluate the nested body content of this tag if the requested variable is equal to the specified value
  • errors Nested Extension - Conditionally display a set of accumulated error messages
  • file Nested Extension - Render A File Select Input Field This tag is an extension of the <a href="
  • form Nested Extension - Define An Input Form This tag is an extension of the <a href="
  • greaterEqual Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value
  • greaterThan Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than the specified value
  • hidden Nested Extension - Render A Hidden Field This tag is an extension of the <a href="
  • image Nested Extension - Render an input tag of type "image" This tag is an extension of the <a href="
  • img Nested Extension - Render an HTML "img" tag This tag is an extension of the <a href="
  • iterate Nested Extension - Repeat the nested body content of this tag over a specified collection
  • lessEqual Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value
  • lessThan Nested Extension - Evaluate the nested body content of this tag if the requested variable is less than the specified value
  • link Nested Extension - Render an HTML anchor or hyperlink This tag is an extension of the <a href="
  • match Nested Extension - Evaluate the nested body content of this tag if the specified value is an appropriate substring of the requested variable
  • message Nested Extension - Render an internationalized message string to the response
  • messages Nested Extension - Conditionally display a set of accumulated messages
  • messagesNotPresent Nested Extension - Generate the nested body content of this tag if the specified message is not present in this request
  • messagesPresent Nested Extension - Generate the nested body content of this tag if the specified message is present in this request
  • multibox Nested Extension - Render A Checkbox Input Field This tag is an extension of the <a href="
  • nest Defines a new level of nesting for child tags to reference to This tag provides a simple method of defining a logical nesting level in the nested hierarchy
  • notEmpty Nested Extension - Evaluate the nested body content of this tag if the requested variable is neither null nor an empty string
  • notEqual Nested Extension - Evaluate the nested body content of this tag if the requested variable is not equal to the specified value
  • notMatch Nested Extension - Evaluate the nested body content of this tag if the specified value is not an appropriate substring of the requested variable
  • notPresent Nested Extension - Generate the nested body content of this tag if the specified value is not present in this request
  • options Nested Extension - Render a Collection of Select Options This tag is an extension of the <a href="
  • optionsCollection Nested Extension - Render a Collection of Select Options This tag is an extension of the <a href="
  • password Nested Extension - Render A Password Input Field This tag is an extension of the <a href="
  • present Nested Extension - Generate the nested body content of this tag if the specified value is present in this request
  • radio Nested Extension - Render A Radio Button Input Field This tag is an extension of the <a href="
  • root To start off a nested hierarchy without the need for a form This tag is provided to allow the nested tags to find a common bean reference without the need for a form and its relative overhead
  • select Nested Extension - Render A Select Element This tag is an extension of the <a href="
  • size Nested Extension - Define a bean containing the number of elements in a Collection or Map
  • submit Nested Extension - Render A Submit Button This tag is an extension of the <a href="
  • text Nested Extension - Render An Input Field of Type text This tag is an extension of the <a href="
  • textarea Nested Extension - Render A Textarea This tag is an extension of the <a href="
  • write Nested Extension - Render the value of the specified bean property to the current JspWriter
  • writeNesting Writes or makes a scripting variable of the current nesting level
Required attributes are marked with a *

<nested:checkbox>

<p><strong>Nested Extension - Render A Checkbox Input Field</strong></p> <p>This tag is an extension of the <a href="../html/checkbox.html"><code>&lt;html:checkbox&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
property*String
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:define>

<p><strong>Nested Extension - Define a scripting variable based on the value(s) of the specified bean property. </strong></p> <p>This tag is an extension of the <a href="../bean/define.html"><code>&lt;bean:define&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
id*String
nameString
propertyString
scopeString
toScopeString
typeString
valueString

<nested:empty>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is either null or an empty string. </strong></p> <p>This tag is an extension of the <a href="../logic/empty.html"><code>&lt;logic:empty&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
nameString
propertyString
scopeString

<nested:equal>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/equal.html"><code>&lt;logic:equal&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:errors>

<p><strong> Nested Extension - Conditionally display a set of accumulated error messages. </strong></p> <p>This tag is an extension of the <a href="../html/errors.html"><code>&lt;html:errors&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
bundleString
footer <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
header <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
localeString
nameString
prefix <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
propertyString
suffix <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String

<nested:file>

<p><strong>Nested Extension - Render A File Select Input Field </strong></p> <p>This tag is an extension of the <a href="../html/file.html"><code>&lt;html:file&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
acceptString
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlengthString
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
property*String
sizeString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:form>

<p><strong>Nested Extension - Define An Input Form</strong></p> <p>This tag is an extension of the <a href="../html/form.html"><code>&lt;html:form&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
acceptCharsetString
action*String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabled <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> boolean
enctypeString
focusString
focusIndexString
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
methodString
onresetString
onsubmitString
readonly <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> boolean
scriptLanguageboolean
styleString
styleClassString
styleIdString
targetString

<nested:greaterEqual>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/greaterEqual.html"><code>&lt;logic:greaterEqual&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:greaterThan>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/greaterThan.html"><code>&lt;logic:greaterThan&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:hidden>

<p><strong>Nested Extension - Render A Hidden Field </strong></p> <p>This tag is an extension of the <a href="../html/hidden.html"><code>&lt;html:hidden&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
altString
altKeyString
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
nameString
property*String
styleClassString
styleIdString
titleString
titleKeyString
valueString
writeboolean

<nested:image>

<p><strong>Nested Extension - Render an input tag of type "image" </strong></p> <p>This tag is an extension of the <a href="../html/image.html"><code>&lt;html:image&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
alignString
altString
altKeyString
borderString
bundleString
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
localeString
moduleString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
pageString
pageKeyString
propertyString
srcString
srcKeyString
styleString
styleClassString
tabindexString
titleString
titleKeyString
valueString

<nested:img>

<p><strong>Nested Extension - Render an HTML "img" tag</strong></p> <p>This tag is an extension of the <a href="../html/img.html"><code>&lt;html:img&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
accesskeyString
actionString
alignString
altString
altKeyString
borderString
bundleString
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
heightString
hspaceString
imageNameString
ismapString
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
localeString
moduleString
nameString
onkeydownString
onkeypressString
onkeyupString
pageString
pageKeyString
paramIdString
paramNameString
paramPropertyString
paramScopeString
propertyString
scopeString
srcString
srcKeyString
styleString
styleClassString
styleIdString
titleString
titleKeyString
useLocalEncodingboolean
usemapString
vspaceString
widthString

<nested:iterate>

<p><strong>Nested Extension - Repeat the nested body content of this tag over a specified collection. </strong></p> <p>This tag is an extension of the <a href="../logic/iterate.html"><code>&lt;logic:iterate&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
collectionString
idString
indexIdString
lengthString
nameString
offsetString
propertyString
scopeString
typeString

<nested:lessEqual>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is greater than or equal to the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/lessEqual.html"><code>&lt;logic:lessEqual&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:lessThan>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is less than the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/lessThan.html"><code>&lt;logic:lessThan&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:link>

<p><strong>Nested Extension - Render an HTML anchor or hyperlink</strong></p> <p>This tag is an extension of the <a href="../html/link.html"><code>&lt;html:link&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
accesskeyString
actionString
anchorString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
forwardString
hrefString
indexIdString
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
linkNameString
moduleString
nameString
onblurString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
pageString
paramIdString
paramNameString
paramPropertyString
paramScopeString
propertyString
scopeString
styleString
styleClassString
styleIdString
tabindexString
targetString
titleString
titleKeyString
transactionboolean
useLocalEncodingboolean

<nested:match>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the specified value is an appropriate substring of the requested variable. </strong></p> <p>This tag is an extension of the <a href="../logic/match.html"><code>&lt;logic:match&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
locationString
nameString
parameterString
propertyString
scopeString
value*String

<nested:message>

<p><strong>Nested Extension - Render an internationalized message string to the response. </strong></p> <p>This tag is an extension of the <a href="../bean/message.html"><code>&lt;bean:message&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
arg0String
arg1String
arg2String
arg3String
arg4String
bundleString
keyString
localeString
nameString
propertyString
scopeString

<nested:messages>

<p><strong> Nested Extension - Conditionally display a set of accumulated messages. </strong></p> <p>This tag is an extension of the <a href="../html/messages.html"><code>&lt;html:messages&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
bundleString
footerString
headerString
id*String
localeString
messageString
nameString
propertyString

<nested:messagesNotPresent>

<p><strong> Nested Extension - Generate the nested body content of this tag if the specified message is not present in this request. </strong></p> <p>This tag is an extension of the <a href="../logic/messagesNotPresent.html"><code>&lt;logic:messagesNotPresent&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
messageString
nameString
propertyString

<nested:messagesPresent>

<p><strong> Nested Extension - Generate the nested body content of this tag if the specified message is present in this request. </strong></p> <p>This tag is an extension of the <a href="../logic/messagesPresent.html"><code>&lt;logic:messagesPresent&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
messageString
nameString
propertyString

<nested:multibox>

<p><strong>Nested Extension - Render A Checkbox Input Field </strong></p> <p>This tag is an extension of the <a href="../html/multibox.html"><code>&lt;html:multibox&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
property*String
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:nest>

<p><strong> Defines a new level of nesting for child tags to reference to </strong></p> <p> This tag provides a simple method of defining a logical nesting level in the nested hierarchy. It run no explicit logic, is simply a place holder. It also means you can remove the need for explicit setting of level properties in child tags. </p> <p> Just as the iterate tag provide a parent to other tags, this does the same but there is no logic for iterating or otherwise. </p> <p> Example...</p> <pre> &lt;nested:write property="myNestedLevel.propertyOne" /&gt; &lt;nested:write property="myNestedLevel.propertyTwo" /&gt; &lt;nested:write property="myNestedLevel.propertyThree" /&gt; </pre> <p>Can instead become...</p> <pre> &lt;nested:nest property="myNestedLevel" &gt; &lt;nested:write property="propertyOne" /&gt; &lt;nested:write property="propertyTwo" /&gt; &lt;nested:write property="propertyThree" /&gt; &lt;/nested:nest &gt; </pre>

Can contain: JSP

Attributes

NameDescriptionType
property This specifies the property by which this tag and all child tags will be relative to. String

<nested:notEmpty>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is neither null nor an empty string. </strong></p> <p>This tag is an extension of the <a href="../logic/notEmpty.html"><code>&lt;logic:notEmpty&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
nameString
propertyString
scopeString

<nested:notEqual>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the requested variable is not equal to the specified value. </strong></p> <p>This tag is an extension of the <a href="../logic/notEqual.html"><code>&lt;logic:notEqual&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
scopeString
value*String

<nested:notMatch>

<p><strong>Nested Extension - Evaluate the nested body content of this tag if the specified value is not an appropriate substring of the requested variable. </strong></p> <p>This tag is an extension of the <a href="../logic/notMatch.html"><code>&lt;logic:notMatch&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
locationString
nameString
parameterString
propertyString
scopeString
value*String

<nested:notPresent>

<p><strong>Nested Extension - Generate the nested body content of this tag if the specified value is not present in this request. </strong></p> <p>This tag is an extension of the <a href="../logic/notPresent.html"><code>&lt;logic:notPresent&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
roleString
scopeString
userString

<nested:options>

<p><strong>Nested Extension - Render a Collection of Select Options</strong></p> <p>This tag is an extension of the <a href="../html/options.html"><code>&lt;html:options&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p> <p> <strong>Note:</strong> The nested context of this tag relies on the use of the "property" property, and the internal use of the "name" property. The nested tags rely on these properties and will attempt to set them itself. The <code>&lt;html:options&gt;</code> tag this tag extended allows other options for the tag which don't use these properties. To take advantage of these options, markup using the <code>&lt;html:options&gt;</code> tag instead of the nested tag. </p> <p> For example, the "collections" option allows you to specify a separate bean reference which itself is a list of objects with properties to access the title and value parts of the html option tag. You can use this in a nested context (the list is a property of a nested bean) by using the nested define tag and the original options tag. </p> <pre> &lt;nested:nest property="myNestedLevel" /&gt; &lt;nested:define property="collectionList" /&gt; &lt;html:options collection="collectionList" property="valueProperty" labelProperty="labelProperty" /&gt; &lt;/nested:nest &gt; </pre>

Can contain: empty

Attributes

NameDescriptionType
collectionString
filterboolean
labelNameString
labelPropertyString
nameString
propertyString
styleString
styleClassString

<nested:optionsCollection>

<p><strong>Nested Extension - Render a Collection of Select Options </strong></p> <p>This tag is an extension of the <a href="../html/optionsCollection.html" ><code>&lt;html:optionsCollection&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
filterboolean
labelString
nameString
property*String
styleString
styleClassString
valueString

<nested:password>

<p><strong>Nested Extension - Render A Password Input Field </strong></p> <p>This tag is an extension of the <a href="../html/password.html"><code>&lt;html:password&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlengthString
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
property*String
readonlyboolean
redisplayboolean
sizeString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:present>

<p><strong>Nested Extension - Generate the nested body content of this tag if the specified value is present in this request. </strong></p> <p>This tag is an extension of the <a href="../logic/present.html"><code>&lt;logic:present&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
cookieString
headerString
nameString
parameterString
propertyString
roleString
scopeString
userString

<nested:radio>

<p><strong>Nested Extension - Render A Radio Button Input Field </strong></p> <p>This tag is an extension of the <a href="../html/radio.html"><code>&lt;html:radio&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
idNameString
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
property*String
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
value*String

<nested:root>

<p><strong>To start off a nested hierarchy without the need for a form</strong></p> <p> This tag is provided to allow the nested tags to find a common bean reference without the need for a form and its relative overhead. As long as the <code>name</code> attribute of this tag matches the name of a bean in scope of the JSP (ie: Struts tags can find it via usual means). For example you can load a bean for use with the <code>jsp:useBean</code> tag. </p> <p> The tag can also be used without specifying the <code>name</code> attribute, but this is only in the case that the current JSP is a dynamic include specified in another file. You will not be able to run the tag without a name unless this inclusion is in place. Otherwise the nested tags will not have the bean and property references that they need to provide their logic. </p> <p> <strong>Note</strong>: The access to a bean via the <code>name</code> attribute takes priority over looking for the reference from other parent tags. So if a name is specified, a bean will have to be there waiting for it. It was made this way so that you could use separate beans within a JSP that itself is an inclusion into another. </p>

Can contain: JSP

Attributes

NameDescriptionType
name The name of the bean by which all child nested tags will derive their bean reference from. String

<nested:select>

<p><strong>Nested Extension - Render A Select Element </strong></p> <p>This tag is an extension of the <a href="../html/select.html"><code>&lt;html:select&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: JSP

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
multipleString
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
property*String
sizeString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:size>

<p><strong>Nested Extension - Define a bean containing the number of elements in a Collection or Map. </strong></p> <p>This tag is an extension of the <a href="../bean/size.html"><code>&lt;bean:size&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
collectionString
id*String
nameString
propertyString
scopeString

<nested:submit>

<p><strong>Nested Extension - Render A Submit Button</strong></p> <p>This tag is an extension of the <a href="../html/submit.html"><code>&lt;html:submit&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
propertyString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:text>

<p><strong>Nested Extension - Render An Input Field of Type text </strong></p> <p>This tag is an extension of the <a href="../html/text.html"><code>&lt;html:text&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
maxlengthString
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
onselectString
property*String
readonlyboolean
sizeString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:textarea>

<p><strong>Nested Extension - Render A Textarea</strong></p> <p>This tag is an extension of the <a href="../html/textarea.html"><code>&lt;html:textarea&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain:

Attributes

NameDescriptionType
accesskeyString
altString
altKeyString
bundle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.7</dd></dl> String
colsString
dir <p>The direction for weak/neutral text for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
disabledboolean
errorKey <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyle <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleClass <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
errorStyleId <dl><dt><b>Since:</b></dt> <dd>Struts 1.2.5</dd></dl> String
indexedboolean
lang <p>The language code for this element.</p> <dl><dt><b>Since:</b></dt> <dd>Struts 1.3.6</dd></dl> String
nameString
onblurString
onchangeString
onclickString
ondblclickString
onfocusString
onkeydownString
onkeypressString
onkeyupString
onmousedownString
onmousemoveString
onmouseoutString
onmouseoverString
onmouseupString
onselectString
property*String
readonlyboolean
rowsString
styleString
styleClassString
styleIdString
tabindexString
titleString
titleKeyString
valueString

<nested:write>

<p><strong>Nested Extension - Render the value of the specified bean property to the current JspWriter. </strong></p> <p>This tag is an extension of the <a href="../bean/write.html"><code>&lt;bean:write&gt;</code></a> tag. Please consult its documentation for information on tag attributes and usage details. </p>

Can contain: empty

Attributes

NameDescriptionType
bundleString
filterboolean
formatString
formatKeyString
ignoreboolean
localeString
nameString
propertyString
scopeString

<nested:writeNesting>

<p><strong> Writes or makes a scripting variable of the current nesting level. </strong></p> This tag provides a way of accessing the nested property reference used by the nested tags. Can expose a scripting variable, or simply write out the value.

Can contain: JSP

Attributes

NameDescriptionType
filter true/false value, describing to the tag if the result if to be URLEncoded. Helps JavaScript along if the result is required for URL hacking. boolean
id If <i>id</i> is supplied, then what would have been written out into the response stream, will instead be made available as a String object defined by the variable name provided. String
property If not supplied, will simply write out as if "./" or "this/" was supplied. String