|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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(java.io.InputStream webXML)
Constructor which expects an input stream containing the web.xml for the application. |
|
ServletRunner(java.io.InputStream webXML,
java.lang.String contextPath)
Constructor which expects an input stream containing the web.xml for the application. |
|
ServletRunner(java.lang.String webXMLFileSpec)
Constructor which expects the full path to the web.xml for the application. |
|
ServletRunner(java.lang.String webXMLFileSpec,
java.lang.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(java.lang.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(java.lang.String resourceName,
java.lang.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(java.lang.String webXMLFileSpec) throws java.io.IOException, org.xml.sax.SAXException
webXMLFileSpec
- the full path to the web.xml filepublic ServletRunner(java.lang.String webXMLFileSpec, java.lang.String contextPath) throws java.io.IOException, org.xml.sax.SAXException
webXMLFileSpec
- the full path to the web.xml filecontextPath
- the context pathpublic ServletRunner(java.io.InputStream webXML) throws java.io.IOException, org.xml.sax.SAXException
public ServletRunner(java.io.InputStream webXML, java.lang.String contextPath) throws java.io.IOException, org.xml.sax.SAXException
Method Detail |
public void registerServlet(java.lang.String resourceName, java.lang.String servletClassName)
public WebResponse getResponse(WebRequest request) throws java.net.MalformedURLException, java.io.IOException, org.xml.sax.SAXException
org.xml.sax.SAXException
- thrown if there is an error parsing the response
java.net.MalformedURLException
java.io.IOException
public WebResponse getResponse(java.lang.String url) throws java.net.MalformedURLException, java.io.IOException, org.xml.sax.SAXException
org.xml.sax.SAXException
- thrown if there is an error parsing the response
java.net.MalformedURLException
java.io.IOException
public ServletUnitClient newClient()
|
Copyright © 2000-2002 Russell Gold. See license agreement for rights granted. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |