| java.lang.Object com.meterware.servletunit.ServletRunner
ServletRunner | public class ServletRunner (Code) | | This class acts as a test environment for servlets.
author: Russell Gold |
Constructor Summary | |
public | ServletRunner() Default constructor, which defines no servlets. | public | ServletRunner(String webXMLFileSpec) Constructor which expects the full path to the web.xml for the
application. | public | ServletRunner(String webXMLFileSpec, String contextPath) Constructor which expects the full path to the web.xml for the
application and a context path under which to mount it. | public | ServletRunner(File webXml) Constructor which expects a File object representing the web.xml for the
application. | public | ServletRunner(File webXml, String contextPath) Constructor which expects a File object representing the web.xml for the
application and a context path under which to mount it. | public | ServletRunner(InputStream webXML) Constructor which expects an input stream containing the web.xml for the application. | public | ServletRunner(InputStream webXML, String contextPath) Constructor which expects an input stream containing the web.xml for the application. |
ServletRunner | public ServletRunner()(Code) | | Default constructor, which defines no servlets.
|
ServletRunner | public ServletRunner(File webXml) throws IOException, SAXException(Code) | | Constructor which expects a File object representing the web.xml for the
application.
Parameters: webXml - the web.xml file since: 1.6 |
ServletRunner | public ServletRunner(File webXml, String contextPath) throws IOException, SAXException(Code) | | Constructor which expects a File object representing the web.xml for the
application and a context path under which to mount it.
Parameters: webXml - the web.xml file Parameters: contextPath - the context path since: 1.6 |
getContextParameter | public String getContextParameter(String name)(Code) | | Returns the value of the named context parameter found in the application definition.
|
getSession | public HttpSession getSession(boolean create)(Code) | | Returns the session to be used by the next request.
Parameters: create - if true, will create a new session if no valid session is defined. since: 1.6 |
newClient | public ServletUnitClient newClient()(Code) | | Creates and returns a new web client that communicates with this servlet runner.
|
registerServlet | public void registerServlet(String resourceName, String servletClassName)(Code) | | Registers a servlet class to be run.
|
registerServlet | public void registerServlet(String resourceName, String servletClassName, Hashtable initParameters)(Code) | | Registers a servlet class to be run, specifying initialization parameters.
|
shutDown | public void shutDown()(Code) | | Shuts down the servlet container, returning any resources held by it.
Calls the destroy method of each active servlet, then notifies
ContextListeners of server shutdown.
|
|
|