response.setContentType("text/html"); PrintWriter out = response.getWriter();
ServletContext context=this.getServletContext(); Integer count=(Integer)context.getAttribute("count");//服务器获取数据 if (count==null) { context.setAttribute("count", 1); } else { context.setAttribute("count", count+1);