O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

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

Using Struts Bean Tags That Access Bean Properties

This section provides information on the following tags:

  • <bean:define>— Defines a local variable based on a property

  • <bean:write>— Displays a value from a bean

  • <bean:size>— Gets the length of a map or collection

This section uses the Bean Bean page at /StrutsTaglibs/BeanBean.do. The rendered page is shown in Figure 13.4.

Figure 13.4. The Bean Bean page.

This page demonstrates a typical use of each of the tags. The source is shown in Listing 13.6.

Listing 13.6. JSP File Demonstrating Use of Struts Bean Tags Accessing Bean Properties (BeanBean.jsp)
 <%@ page language="java" %> <%@ taglib ...

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