jsp计数器-jsp文件
点击次数:29 次 发布日期:2008-11-26 15:51:40 作者:源代码网
|
源代码网推荐 <HEAD> 源代码网推荐 <TITLE>JSP Bean Example</TITLE> 源代码网推荐 </HEAD> 源代码网推荐 源代码网推荐 <BODY> 源代码网推荐 源代码网推荐 <!-- Set the scripting language to java --> 源代码网推荐 <%@ page language="java" %> 源代码网推荐 源代码网推荐 <!-- Instantiate the Counter bean with an id of "counter" --> 源代码网推荐 <jsp:useBean id="counter" scope="session" class="Counter" /> 源代码网推荐 源代码网推荐 <!-- Set the bean"s count property to the value of --> 源代码网推荐 <!-- the request parameter "count", using the --> 源代码网推荐 <!-- jsp:setProperty action. --> 源代码网推荐 <jsp:setProperty name="counter" property="count" param="count" /> 源代码网推荐 源代码网推荐 <% 源代码网推荐 源代码网推荐 // write the current value of the property count 源代码网推荐 out.println("Count from scriptlet code : " 源代码网推荐 + counter.getCount() + "<BR>"); 源代码网推荐 源代码网推荐 %> 源代码网推荐 源代码网推荐 <!-- Get the bean"s count property, --> 源代码网推荐 <!-- using the jsp:getProperty action. --> 源代码网推荐 Count from jsp:getProperty : 源代码网推荐 <jsp:getProperty name="counter" property="count" /><BR> 源代码网推荐 源代码网推荐 </BODY> 源代码网推荐 </HTML> 源代码网推荐 源代码网供稿. |
