jsp计数器-bean文件
2000-12-11 16:38:01 来源:WEB开发网核心提示:import java.io.Serializable;public class Counter implements Serializable{// Initialize the bean on creationint count = 0;// Parameterless Constructorpublic Coun
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;
}
}
更多精彩
赞助商链接