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"/>
jsp:setProperty和jsp:getProperty动作到底怎么用举例?
猜你喜欢
转载自www.cnblogs.com/mark-to-win/p/10554288.html
今日推荐
周排行