public static class EntityHttpServletRequest.EntityServletContext extends Object implements ServletContext
| Modifier and Type | Field and Description |
|---|---|
static String |
TEMP_DIR_CONTEXT_ATTRIBUTE |
| Constructor and Description |
|---|
EntityHttpServletRequest.EntityServletContext()
Create a new MockServletContext, using no base path and a
DefaultResourceLoader (i.e. the classpath root as WAR root).
|
EntityHttpServletRequest.EntityServletContext(String resourceBasePath)
Create a new MockServletContext, using a DefaultResourceLoader.
|
public static final String TEMP_DIR_CONTEXT_ATTRIBUTE
public EntityHttpServletRequest.EntityServletContext()
DefaultResourceLoaderpublic EntityHttpServletRequest.EntityServletContext(String resourceBasePath)
resourceBasePath - the WAR root directory (should not end with a slash)DefaultResourceLoaderprotected String getResourceLocation(String path)
path - the path as specifiedpublic void setContextPath(String contextPath)
public String getContextPath()
public void registerContext(String contextPath, ServletContext context)
public ServletContext getContext(String contextPath)
getContext in interface ServletContextpublic int getMajorVersion()
getMajorVersion in interface ServletContextpublic int getMinorVersion()
getMinorVersion in interface ServletContextpublic String getMimeType(String filePath)
getMimeType in interface ServletContextpublic Set getResourcePaths(String path)
getResourcePaths in interface ServletContextpublic URL getResource(String path) throws MalformedURLException
getResource in interface ServletContextMalformedURLExceptionpublic InputStream getResourceAsStream(String path)
getResourceAsStream in interface ServletContextpublic RequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface ServletContextpublic RequestDispatcher getNamedDispatcher(String path)
getNamedDispatcher in interface ServletContextpublic Servlet getServlet(String name)
getServlet in interface ServletContextpublic Enumeration getServlets()
getServlets in interface ServletContextpublic Enumeration getServletNames()
getServletNames in interface ServletContextpublic void log(String message)
log in interface ServletContextpublic void log(Exception ex, String message)
log in interface ServletContextpublic void log(String message, Throwable ex)
log in interface ServletContextpublic String getRealPath(String path)
getRealPath in interface ServletContextpublic String getServerInfo()
getServerInfo in interface ServletContextpublic String getInitParameter(String name)
getInitParameter in interface ServletContextpublic Enumeration getInitParameterNames()
getInitParameterNames in interface ServletContextpublic Object getAttribute(String name)
getAttribute in interface ServletContextpublic Enumeration getAttributeNames()
getAttributeNames in interface ServletContextpublic void setAttribute(String name, Object value)
setAttribute in interface ServletContextpublic void removeAttribute(String name)
removeAttribute in interface ServletContextpublic void setServletContextName(String servletContextName)
public String getServletContextName()
getServletContextName in interface ServletContextCopyright © 2007-2014 CARET, University of Cambridge. All Rights Reserved.