Interface ServletContext
2014-09-28 23:55
288 查看
javax.servlet
Interface ServletContext
public interface ServletContextDefines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file.There is one context per "web application" per Java Virtual Machine. (A "web application" is a collection of servlets and content installed under a specific subset of the server's URL namespace such as
/catalogand possibly installed via a
.warfile.)
In the case of a web application marked "distributed" in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information
(because the information won't be truly global). Use an external resource like a database instead.
The
ServletContextobject is contained within the
ServletConfigobject, which the Web server provides the servlet when the servlet is initialized.
相关文章推荐
- jbpm 错误 loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFacto
- jbpm 错误 loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFacto
- @WebServlet 注解value少了左斜线-导致报错--Exception starting Context with name
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- Spring异常:Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.
- Java-ServletContextEvent-ServletContextAttributeEvent
- Difference between applicationContext.xml and spring-servlet.xml in Spring
- java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/
- web.xml之context-param,listener,filter,servlet加载顺序
- JSF运行时出现javax.servlet.jsp.JspException: Cannot find FacesContext处理方法
- ActionContext和ServletActionContext小结
- [j2ee][servlet]<context-param>与<init-param>的区别与作用
- 【Spring Cloud】Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCon
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource
- ServletContext
- 严重: Servlet.service() for servlet [default] in context with path [/a] threw exception [edu.yale.its.
- spring mvc框架 web.xml配置文件 Could not open ServletContext resource [/WEB-INF/classes/spring-servlet.xml] 错误
- ServletContext,ActionContext,ServletActionContext
- nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.pro