O'Reilly logo

Programming Jakarta Struts, Second Edition by Chuck Cavaness

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bean Tags

The tags that are part of the Bean tag library are used for accessing JavaBeans and their associated properties as well as for defining new beans 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 values of request cookies, headers, and parameters are also provided. Table 8-9 lists the tags within the Bean tag library.

Table 8-9. Custom tags within the Bean tag library

Tag name

Description

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.

Warning

Many of the tags in this tag library throw a JspException at runtime when they are used incorrectly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required