application

Application

对应的类 ServletContext
用于保存整个WebApplication的生命周期内均可以访问的数据

xx extends HttpServlet
ServletContext application = this.getServletContext();
//拿到全部客户端的内存
//包括 Servlet 的整个容器

ServletContext application = this.getServletContext();
Object objValue = (Object) application.getAttribute("paramName"); application.setAttribute(" paramName ",  objValue);
相关文章
相关标签/搜索