This chapter provides sample instructions for deploying the WAR file to Jetty. See Upgrading for Jetty Deployments for instructions on updating to a new version of the SOAtest and Virtualize Server.

  1. 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.
  2. Download Jetty for your platform from http://www.eclipse.org/jetty/.
  3. Extract the downloaded Jetty file to a location of your choice (<JETTY_HOME>).
  4. 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
  5. 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 
  6. (Optional) Configure Jetty for SSL to deploy the WAR file over HTTPS:
    1. Use the JDK keytool to generate a key:

      keytool -keystore keystore -alias jetty -genkey -keyalg RSA
    2. Enter storepwd as the keystore password.
    3. Answer the questions when prompted (i.e., name, organization, etc.).
    4. Use keypwd as the key password.
  7. Extract the war file contents to the webapps/ROOT directory under the directory created in step 1. This will be <SOAVIRT_HOME> directory.
  8. Specify the ports used by Jetty in the config.properties file at <SOAVIRT_HOME>/WEB-INF/config.properties (see Server Configuration for details). For example, you might use server.port.http=8080 or server.port.https=8443. The ports specified in config.properties must match the ports specified in the Jetty configuration.
  9. Specify the appropriate license in the config.properties file at <SOAVIRT_HOME>/WEB-INF/config.properties (see Server Configuration for details).
  10. Start Jetty from directory created in step 1. For example:

    java -jar <JETTY_HOME>/start.jar
     
  11. Browse to http://localhost:8080/ (adjust the port if needed). The following message confirms that the application was installed correctly:

There are no deployments on this server. Cannot respond to this request: /.

If installation is successful, a workspace directory will be created in <SOAVIRT_HOME>.

  • No labels