jsp計(jì)數(shù)器-jsp文件
更新時(shí)間: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>
相關(guān)文章
基于javaweb+mysql的jsp+servlet宿舍管理系統(tǒng)(超級管理員、宿舍管理員、學(xué)生)
基于javaweb+mysql的jsp+servlet宿舍管理系統(tǒng)(超級管理員、宿舍管理員、學(xué)生)(java+jsp+servlet+javabean+mysql+tomcat),需要的朋友可以參考下2023-08-08
JSP中的PreparedStatement對象操作數(shù)據(jù)庫的使用教程
這篇文章主要介紹了JSP中的PreparedStatement對象操作數(shù)據(jù)庫的使用教程,文中舉了一些使用PreparedStatement預(yù)處理語句對象進(jìn)行MySQL增刪查改的例子,需要的朋友可以參考下2016-04-04
Spring Quartz2 動態(tài)任務(wù)的實(shí)例詳解
這篇文章主要介紹了Spring Quartz2 動態(tài)任務(wù)的實(shí)例詳解的相關(guān)資料,Spring4整合quartz2.2.3簡單動態(tài)任務(wù),需要的朋友可以參考下2017-08-08
jsp項(xiàng)目中更改tomcat的默認(rèn)index.jsp訪問路徑的方法
如何更改tomcat的默認(rèn)index.jsp訪問路徑,jsp的工程下有一個(gè)叫做WEB-INF文件夾下的web.xml打開它,按照下面的方法即可修改2013-11-11
一個(gè)開發(fā)人員眼中的JSP技術(shù)(上)
一個(gè)開發(fā)人員眼中的JSP技術(shù)(上)...2006-10-10

