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

JSP
小窗口大学问--玩转弹出窗口(3)
JDBC数据库访问例子(2)
用JSP操作Cookie(2)
JSP连接各类数据库大全(4)
JSP连接各类数据库大全(7)
WebLogic的初步研究(1-2)
JAVA/JSP学习系列之十
JAVA/JSP学习系列之九
JAVA/JSP学习系列之十二
JAVA/JSP学习系列之十四
WebLogic的初步研究(2-2)
WebLogic的初步研究(2-1)
JSP与Servlet之一
JAVA/JSP学习系列之十一
WebLogic的初步研究(1-1)
JSP与Servlet之二
JDBC数据库访问例子(1)
JSP技巧:发送动态图像(3)
JSP连接各类数据库大全(2)
JSP编程进度条设计实例(4)

JSP 中的 jsp计数器-bean文件


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

  import java.io.Serializable;

public class Counter implements Serializable{

// Initialize the bean on creation
int count = 0;

// Parameterless Constructor
public Counter() {

}

// Property Getter
public int getCount() {

// Increment the count property, with every request
count++;

return this.count;
}

// Property Setter
public void setCount(int count) {

this.count = count;
}
}