当前位置: 首页 > 图文教程 > 网络编程 > JSP > jsp计数器-jsp文件

JSP
JSP由浅入深(10-1)
JSP中的TagLib应用(4-2)
JSP语法(7)
JSP语法(3)
JSP中的TagLib应用(3-3)
JSP程序员成长之路之二
JSP语法(2)
JSP程序员成长之路之一
JSP语法(4)
JSP语法(1)
自己写的玩的东西,通过网络建立一个ejb的框架,并进行weblogic的部署
Tomcat自动reload新的class的插件
JSP由浅入深(10-2)
JSP由浅入深(11-1)
JSP由浅入深(11-2)
JSP由浅入深(11-3)
JSP由浅入深(2)
JSP由浅入深(4-3)
JSP由浅入深(12)
JSP由浅入深(7)

JSP 中的 jsp计数器-jsp文件


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 38 ::
收藏到网摘: n/a

<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>