servlet初步(六) application



1.cookie 只有客户端能够访问

 session 每个客户端只能访问自己的session


application 所有客户端可以共享的



2、


ServletContext  web-app上下文


ServletContext application = getServletContext();


int count;


count = (int) application.getAttribute("count");


count++

application.setAttribute("count",count);




3、带包名的servlet  






posted on 2015-06-28 23:11  _故乡的原风景  阅读(126)  评论(0编辑  收藏  举报