| Actions in JSP |
| |
| The jsp:getProperty Action |
| |
| This element retrieves the value of a bean property, converts it to a string, and inserts it into the output. |
| The two required attributes are name, the name of a bean previously referenced via jsp:useBean, and property, the property whose value should be inserted. |
| |
| Here's an example: |
<jsp:useBean id="itemBean" ... />
...
<UL>
<LI>Number of items:
<jsp:getProperty name="itemBean" property="numItems" />
<LI>Cost of each:
<jsp:getProperty name="itemBean" property="unitCost" />
</UL> |
| |
| |
|
| |
| |