jsp:setProperty和jsp:getProperty动作到底怎么用举例?

2.jsp:setProperty和jsp:getProperty动作:(视频下载) (全部书籍)

jsp:useBean动作获得Bean实例之后,要设置Bean的属性可以通过jsp:setProperty动作进行。读取Bean属性可以通过使用jsp:getProperty动作。


例 4.2.1
<html>
<head>
</head>
<body>
<form action="jsp1.jsp" method="POST">
count<input  type="text" name="count"/><br />
Email:<input  type="text" name="email"/><br />
age:<input  type="text" name="age"/>
<input  type="submit" value="submit"/>
</form>
</body>
</html>
<jsp:useBean id="count1" class="com.MyBean"/>
<jsp:setProperty name="count1" property="count" />
Count1:
<jsp:getProperty name="count1" property="count"/>

详情请见:http://www.mark-to-win.com/index.html?content=Jsp/jspUrl.html&chapter=Jsp/jsp3_web.html#HowUsejspsetPropertygetProperty

猜你喜欢

转载自www.cnblogs.com/mark-to-win/p/10554288.html