jsp计数器-bean文件
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 17:59 点击:次
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;
}
}
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;
}
}
相关新闻>>
- 发表评论
-
- 最新评论 更多>>