如何在Servlet中创建使用application对象

如何在Servlet中创建使用application对象

要在Servlet中创建使用application对象其实很简单如下:

this.getServletContext.setAttribute("…","…");
Servlet中的实例

注意: this.getServletContext这个方法的返回值对象就是application对象。

你可能感兴趣的:(JSP)