JSP计数器-BEAN文件
类别: JSP教程
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;
}
}
- 上一篇: JSP计数器-JSP文件
- 下一篇: JSP在线考试系统-JSP文件
-= 资 源 教 程 =-
文 章 搜 索