[Top] [Prev] [Next] [Bottom]

<jsp:getProperty>

Gets the value of a Bean property so that you can display it in a result page.

JSP Syntax

<jsp:getProperty name="beanInstanceName"  property="propertyName" />

Examples

<jsp:useBean id="calendar" scope="page" class="employee.Calendar" />
<h2>
Calendar of <jsp:getProperty name="calendar" property="username" /> 
</h2>

Description

You must create or locate a Bean instance with <jsp:useBean> before you use <jsp:getProperty>.

The <jsp:getProperty> tag gets a Bean property value using the property's get method, converts the value of a Bean property to a String and stores it in the out object.

In JSP 1.0, <jsp:getProperty> has a few limitations you should be aware of:

Attributes

See Also



[Top] [Prev] [Next] [Bottom]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.