|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.meterware.servletunit.ServletRunner
This class acts as a test environment for servlets.
| Constructor Summary | |
ServletRunner()
Default constructor, which defines no servlets. |
|
ServletRunner(InputStream webXML)
Constructor which expects an input stream containing the web.xml for the application. |
|
ServletRunner(InputStream webXML,
String contextPath)
Constructor which expects an input stream containing the web.xml for the application. |
|
ServletRunner(String webXMLFileSpec)
Constructor which expects the full path to the web.xml for the application. |
|
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. |
|
| Method Summary | |
WebResponse |
getResponse(String url)
Returns the response from the specified servlet using GET. |
WebResponse |
getResponse(WebRequest request)
Returns the response from the specified servlet. |
ServletUnitClient |
newClient()
Creates and returns a new web client that communicates with this servlet runner. |
void |
registerServlet(String resourceName,
String servletClassName)
Registers a servlet class to be run. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ServletRunner()
public ServletRunner(String webXMLFileSpec)
throws IOException,
SAXException
webXMLFileSpec - the full path to the web.xml file
public ServletRunner(String webXMLFileSpec,
String contextPath)
throws IOException,
SAXException
webXMLFileSpec - the full path to the web.xml filecontextPath - the context path
public ServletRunner(InputStream webXML)
throws IOException,
SAXException
public ServletRunner(InputStream webXML,
String contextPath)
throws IOException,
SAXException
| Method Detail |
public void registerServlet(String resourceName,
String servletClassName)
public WebResponse getResponse(WebRequest request)
throws MalformedURLException,
IOException,
SAXException
SAXException - thrown if there is an error parsing the response
public WebResponse getResponse(String url)
throws MalformedURLException,
IOException,
SAXException
SAXException - thrown if there is an error parsing the responsepublic ServletUnitClient newClient()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||