jsp计数器-jsp文件

所属分类: 网络编程 / JSP编程 阅读数: 1965
收藏 0 赞 0 分享
<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>
更多精彩内容其他人还在看

使用JavaBean创建您的网上日历本(2)

使用JavaBean创建您的网上日历本(2)
收藏 0 赞 0 分享

如何用Jsp读取Mysql数据库

如何用Jsp读取Mysql数据库
收藏 0 赞 0 分享

打开页面就是全屏的方法

打开页面就是全屏的方法
收藏 0 赞 0 分享

如何在Jsp中使用JDBC来联结MySql

如何在Jsp中使用JDBC来联结MySql
收藏 0 赞 0 分享

在linux上建jsp環境

这篇文章主要介绍了在linux上建jsp環境
收藏 0 赞 0 分享

如何使用JSP访问MySQL数据库

如何使用JSP访问MySQL数据库
收藏 0 赞 0 分享

JSP数据库操作例程(Use Bean)

JSP数据库操作例程(Use Bean)
收藏 0 赞 0 分享

如何使用JSP+MySQL创建留言本(一)

如何使用JSP+MySQL创建留言本(一)
收藏 0 赞 0 分享

如何使用JSP+MySQL创建留言本(二)

如何使用JSP+MySQL创建留言本(二)
收藏 0 赞 0 分享

如何使用JSP连接DB2数据库

如何使用JSP连接DB2数据库
收藏 0 赞 0 分享
查看更多