---
title: "存取javabean"
author: "fanjava"
date: "2005-07-08T20:43:00Z"
tags: []
slug: "javabean"
draft: false
lastmod: "2005-07-08T20:43:00Z"
id: 601708
url: "https://fanjava.iteye.com/blog/601708"
---

用&lt;jsp:setProperty &gt;标签来设定javabean的属性,通过以下方式来设定:

&lt;jsp:setProperty name="**someBean**" property="**someProperty**" value="**somevalue**"/&gt;

&lt;jsp:setProperty name="**someBean**" param="**requestParam**" property="**someProperty**"/&gt;

&lt;jsp:setProperty name="**someBean**" property="**someProperty**"/&gt;

&lt;jsp:setProperty name="**someBean**" property="**\***"/&gt;

取得javaBean的属性,用&lt;jsp:getProperty&gt;标签

&lt;jsp:getProperty name="**someBean**" property="**someProperty**"/&gt;

&lt;!-- google\_ad\_client = "pub-3051157228350391"; google\_alternate\_color = "FF0000"; google\_ad\_width = 300; google\_ad\_height = 250; google\_ad\_format = "300x250\_as"; google\_ad\_channel ="2408491454"; google\_ad\_type = "text\_image"; google\_page\_url = document.location; google\_color\_border = "FF4500"; google\_color\_bg = "FFEBCD"; google\_color\_link = "DE7008"; google\_color\_url = "E0AD12"; google\_color\_text = "8B4513"; //--&gt; &lt;iframe name="google\_ads\_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3051157228350391&amp;dt=1120828192171&amp;alt\_color=FF0000&amp;format=300x250\_as&amp;output=html&amp;channel=2408491454&amp;url=http%3A%2F%2Fblog.csdn.net%2Ffckeditor%2Feditor%2Ffckeditor.html%3FInstanceName%3DEditor\_Edit\_FCKEditor%26Toolbar%3DDefault&amp;color\_bg=FFEBCD&amp;color\_text=8B4513&amp;color\_link=DE7008&amp;color\_url=E0AD12&amp;color\_border=FF4500&amp;ad\_type=text\_image&amp;u\_h=768&amp;u\_w=1024&amp;u\_ah=740&amp;u\_aw=1024&amp;u\_cd=32&amp;u\_tz=480&amp;u\_his=22&amp;u\_java=true" frameborder="0" width="300" scrolling="no" height="250" allowtransparency="65535"&gt;&lt;/iframe&gt;