jsp計數(shù)器-jsp文件
更新時間:2006年10月13日 00:00:00 作者:
<HTML>
<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>
<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>
相關文章
JSP動態(tài)實現(xiàn)web網(wǎng)頁登陸和注冊功能
這篇文章主要介紹是動態(tài)實現(xiàn)web網(wǎng)頁登陸和注冊功能的示例代碼,文中代碼講解詳細,對我們學習JSP有一定的幫助,感興趣的小伙伴可以跟隨小編一起學習一下2021-12-12Jsp+Servlet實現(xiàn)文件上傳下載 文件列表展示(二)
這篇文章主要為大家詳細介紹了Jsp+Servlet實現(xiàn)文件上傳下載功能的第二部分,文件列表展示,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-01-01