//加入防刷机制
boolean justVisit = false; //是否在指定的时间内访问过
Cookie[] cookies = request.getCookies();
if (null != cookies) {
for (int i = cookies.length - 1; i >= 0; i--) {
if (("Bwl_App_" + userName).equals(cookies[i].getName())) {
justVisit = true;
break;
}
}
}
if (!justVisit) { //如果最近没有访问过
Cookie coo = new Cookie("Bwl_App_" + userName, "value");
//
coo.setMaxAge(5 * 60);
response.addCookie(coo);
//TODO 增加访问计数
}