日期:2014-05-17 浏览次数:20803 次
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=gb2312");
PrintWriter out = response.getWriter();
ServletContext application=this.getServletContext();
Integer accessCount=(Integer) application.getAttribute("accessCount");
if(accessCount==null)
accessCount=0;
else
accessCount=accessCount+1;
application.setAttribute("accessCouunt", accessCount);
out.println(accessCount);
}