org.apache.tapestry
Class JettyRunner
java.lang.Object
org.apache.tapestry.JettyRunner
public class JettyRunner
- extends Object
A utitilty class for running an instance of the Jetty servlet container from within a unit
test. This code is based on the Jetty 6 code base (which is in beta at the time of writing). When
combined with jWebUnit, this allows for basic
integration testing of an application from within a unit test case.
- Author:
- Howard M. Lewis Ship
|
Constructor Summary |
JettyRunner()
Creates and starts a new instance of Jetty, using default configuration values. |
JettyRunner(String contextPath,
int port,
String warPath)
Creates and starts a new instance of Jetty. |
DEFAULT_CONTEXT_PATH
public static final String DEFAULT_CONTEXT_PATH
- See Also:
- Constant Field Values
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
DEFAULT_WAR_PATH
public static final String DEFAULT_WAR_PATH
- See Also:
- Constant Field Values
JettyRunner
public JettyRunner()
- Creates and starts a new instance of Jetty, using default configuration values. The
contextPath will be /, the port will be 80, the warPath will be src/main/webapp.
JettyRunner
public JettyRunner(String contextPath,
int port,
String warPath)
- Creates and starts a new instance of Jetty. This should be done from a test case setup
method.
- Parameters:
contextPath - the context path for the deployed applicationport - the port number used to access the applicationwarPath - the path to the exploded web application (typically, "src/main/webapp")
stop
public void stop()
- Stops the Jetty instance. This should be called from a test case tear down method.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.