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

JSP
在JSP中访问Oracle数据库
在JSP中访问数据库大全
用简单的代码来实现文件上传
一个分页的类及调用的例子
以IP与Port建立与SQLSERVER的连接
在JSP中处理虚拟路径
JSP的内部对象
JSP中使用JavaMail
批量处理JDBC语句提高处理速度
购物车的源程序
JSP语法Page指令
JDBC-ODBC翻页例子
JSP数据库操数据分页显示
JSP的出错处理
JSP计数器的制作
jsp实现cookie的使用
实现论坛树型结构的具体算法
jsp搜索引擎
利用JSP建立Web站点
JSP读取文件实例

JSP 中的 jsp计数器-jsp文件


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 63 ::
收藏到网摘: 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>