jsp计数器-bean文件
程序员文章站
2022-06-15 13:48:06
import java.io.serializable;public class counter implements serializable{// initializ...
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;
}
}
下一篇: 奥特曼的假日生活