Struts bean tags

You can create Struts bean tags from the Struts Bean Tags drawer. These JSP custom tags are useful in defining new beans (in any desired scope) from a variety of possible sources, as well as a tag to render a particular bean (or bean property) to the output response.

When you are editing a Struts JSP page in Page Designer, you open the Struts Bean Tags drawer on the palette and add to the page any of the elements that are listed in the table below.

The tags are listed in alphabetical order. Some tags may be hidden on the palette. To show a hidden tag in the palette, right-click the tags drawer and select

Customize. Clear the

Hide check box for each component that you want to display on the palette.

Each tag has a number of attributes you can set by using the Properties view of the tag. For an alphabetical listing and description of all the attributes, refer to the related reference. To look up attributes for which you want additional detail, use the Attribute listings while working with the Properties view of the tag.

Each tag has a

bean prefix. For example,

cookie is bean:cookie.

Element Description
Cookie Defines a scripting variable based on the values of the specified request cookie.
Define Defines a scripting variable based on the values of the specified bean property.
Header Defines a scripting variable based on the values of the specified request header.
Include Loads the response from a dynamic application request and makes it available as a bean.
Message Renders an internationalized message string to the response.
Page Exposes a specified item from the page context as a bean.
Parameter Defines a scripting variable based on the values of the specified request parameter.
Resource Loads a Web application resource and makes it available as a bean.
Size Defines a bean that contains the number of elements in a

Collection or

Map class.

Struts Exposes a named Struts internal configuration object as a bean.
Write Inserts the value of the specified bean property into the current JSP page being rendered.