![]() |
#2
徐志摩2008-07-07 12:29
|
ServletContext context = getServletContext(); //这容器有什么用
Integer count = (Integer) context.getAttribute("counter"); //counter哪来的
if(count==null)
{
count = new Integer(1);
}else{
count = new Integer(count.intValue()+1);
}
context.setAttribute("counter", count); //设置counter的属性是什么意思