| java.lang.Object org.directwebremoting.util.FakeServletContext
FakeServletContext | public class FakeServletContext implements ServletContext(Code) | | Fake implementation of the ServletContext interface.
author: Rod Johnson author: Juergen Hoeller author: Joe Walker [joe at getahead dot ltd dot uk] |
Constructor Summary | |
public | FakeServletContext() Create a new FakeServletContext, using no base path and a
DefaultResourceLoader (i.e. | public | FakeServletContext(String resourceBasePath) Create a new FakeServletContext, using a DefaultResourceLoader. |
FakeServletContext | public FakeServletContext()(Code) | | Create a new FakeServletContext, using no base path and a
DefaultResourceLoader (i.e. the classpath root as WAR root).
|
FakeServletContext | public FakeServletContext(String resourceBasePath)(Code) | | Create a new FakeServletContext, using a DefaultResourceLoader.
Parameters: resourceBasePath - the WAR root directory (should not end with a slash) |
addInitParameter | public void addInitParameter(String name, String value)(Code) | | Add an init parameter to the list that we hand out
Parameters: name - The name of the new init parameter Parameters: value - The value of the new init parameter |
getContextPath | public String getContextPath()(Code) | | See Servlet API version 2.5
The context path for this servlet |
getMajorVersion | public int getMajorVersion()(Code) | | |
getMinorVersion | public int getMinorVersion()(Code) | | |
getResourceLocation | protected String getResourceLocation(String path)(Code) | | Build a full resource location for the given path,
prepending the resource base path of this FakeServletContext.
Parameters: path - the path as specified the full resource path |
getServletContextName | public String getServletContextName()(Code) | | |
removeAttribute | public void removeAttribute(String name)(Code) | | |
setServletContextName | public void setServletContextName(String servletContextName)(Code) | | Accessor for the servlet context name. Normally read-only, but read
write in this fake context
Parameters: servletContextName - The new servlet context name |
|
|