This chapter provides sample instructions for deploying the WAR file to Jetty. See Upgrading Virtualize Server for Jetty Deployments for instructions on updating to a new version of the SOAtest and Virtualize Server.
- Create a new folder to serve as home directory for your web application. It can be located anywhere except within the Jetty webapps directory. For example, on Windows you might use c:/wars/soavirt.
- Download Jetty for your platform from http://www.eclipse.org/jetty/.
- Extract the downloaded Jetty file to a location of your choice (<JETTY_HOME>).
- Initialize the directory created in step 1 to serve as the Jetty base directory. For example, you might use:
java -jar <JETTY_HOME>/start.jar --add-to-start=http,deploy
- Disable the Jetty auto-deploy mechanism to avoid problems associated with automatic redeployment. For example, you can set the following property in the <JETTY_HOME>/start.ini file:
jetty.deploy.scanInterval=0
- (Optional) Configure Jetty for SSL to deploy the WAR file over HTTPS:
- Use the JDK keytool to generate a key:
keytool -keystore keystore -alias jetty -genkey -keyalg RSA
- Enter
storepwd
as the keystore password. - Answer the questions when prompted (i.e., name, organization, etc.).
- Use
keypwd
as the key password.
- Use the JDK keytool to generate a key:
- Extract the war file contents to the webapps/ROOT directory under the directory created in step 1. This will be <SOAVIRT_HOME> directory.
- Specify the ports used by Jetty in the config.properties file at <SOAVIRT_HOME>/WEB-INF/config.properties (see Configuring Virtualize Server Configuration for details). For example, you might use
server.port.http=8080
orserver.port.https=8443
. The ports specified in config.properties must match the ports specified in the Jetty configuration. - Specify the appropriate license in the config.properties file at <SOAVIRT_HOME>/WEB-INF/config.properties (see Configuring Virtualize Server Configuration for details).
- Start Jetty from directory created in step 1. For example:
java -jar <JETTY_HOME>/start.jar
- Browse to http://localhost:8080/ (adjust the port if needed). The following message confirms that the application was installed correctly:
...