(共6页PPT)获取application内置对象.pptx

获取application内置对象【沐言科技】课程Servlet服务端编程

获取ServletContext接口实例application内置对象对应的类型为“jakarta.servlet.ServletContext”接口实例,是一个保存在WEB容器中的内置对象,所有的用户都可以直接使用同一个application对象。在Servlet中如果要想获取ServletContext接口实例,则可以通过GenericServlet类或者ServletRequest接口中的“getServletContext()”方法来完成

范例:获取ServletContext接口实例@Override

pro

文档评论(0)

1亿VIP精品文档

相关文档