在用户登录成功的时候,这是我以前做的,你可以看看
//计数器
Integer count =(Integer)application.getAttribute("count");
if(count==null)
{
count=1;
}
else
{
count+=1;
}
application.setAttribute("count",count);
使用appliaction全局变量,session不好做。
这个通过session、记录应该很好做吧