This chapter provides sample instructions for deploying the WAR to Apache Tomcat. See Upgrading for Apache Tomcat Deployments for instructions on updating to a newer version of the SOAtest and Virtualize Server.
The first example outlines the recommended method for deploying a WAR file at the root context of Apache Tomcat. The second example describes a shortcut for an easier (but not recommended) installation method. Using a "non-root" context might not work for some servlet containers.
One way to deploy the WAR file with Apache Tomcat at the ROOT context path is as follows:
Open <TOMCAT_HOME>/conf/Catalina/localhost/ROOT.xml file and add a Context element such as the following (making the appropriate adjustments to docBase absolute path as needed, depending on your specific <SOAVIRT_HOME> location):
<Context docBase="c:/wars/soavirt" path="" reloadable="true" /> |
<JAVA_HOME>/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/my/keystore
A new file in the /path/to/my directory named "keystore" will be created. Uncomment the SSL HTTP/1.1 Connector entry in the <TOMCAT_HOME>/conf/server.xml configuration file:
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --> <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="${user.home}/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS"/> keystoreFile attribute value to "/path/to/my/keystore" |
server.port.http=8080
or server.port.https=8443
. The ports specified in config.properties must match the ports specified in the Tomcat configuration.There are no deployments on this server. Cannot respond to this request: /. |
By default, a workspace directory will be created in <SOAVIRT_HOME>.
Although this method is easier than the first, it is not recommended because it removes the default Tomcat ROOT web application.
<JAVA_HOME>/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/my/keystore
Uncomment the SSL HTTP/1.1 Connector entry in the <TOMCAT_HOME>/conf/server.xml configuration file:
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --> <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="${user.home}/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS"/> keystoreFile attribute value to "/path/to/my/keystore" |
server.port.http=8080
or server.port.https=8443
. The ports specified in config.properties must match the ports specified in the Tomcat configuration.There are no deployments on this server. Cannot respond to this request: /. |
By default, a workspace directory will be created in <TOMCAT_HOME>/webapps/ROOT.
You can enable Tomcat to set a custom HTTP status code message. This allows Virtualize to customize status messages in response headers if your responders set custom HTTP status message. Add the following property to the conf/catalina.properties file when deploying the WAR file:
org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true
See http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html for additional information about setting this property.