首页 > 编程 > JSP > 正文

jsp计数器-bean文件

2019-11-18 21:48:41
字体:
来源:转载
供稿:网友
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;
}
}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表