javaweb访问计数
public class Counter {
private int count;
public Counter(){
count=0;
}
public int getCount(){
count++;
return count;
}
public void setCount(int count){
this.count=count;
}
}
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
WatchnetCounter
This is Watch First page:counter1.jsp
The number of two page watched:
The number of two page watched: