WEB开发网
开发学院WEB开发Jsp jsp计数器-bean文件 阅读

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;
}
}

Tags:jsp 计数器 bean

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接