isCOBOL WebClient : Deploying in Tomcat
Deploying in Tomcat
Even though WebClient comes with an embedded Jetty server, it is also possible to deploy it in an external servlet container like Tomcat. Other J2EE servers can work as well, as long as they support the Servlet 3.0 spec.
WebClient
To deploy WebClient to Tomcat follow these steps:
1. Make a copy of webclient-server.war from the isCOBOL SDK to Tomcat's webapps folder
2. In webclient.properties set the property webclient.server.websocketUrl to
ws://localhost:<port>
with the port that Tomcat is running on
3. In catalina.properties add the following properties:
webclient.warLocation=webapps/webclient-server.war
webclient.configFile=<path to WebClient’s webclient.config file>
webclient.tempDirBase=<path to WebClient’s tmp folder>
webclient.rootDir=<path to WebClient root>
Note - Tomcat should be executed from its root folder, otherwise the path to webclient.war needs to be adjusted.
If Tomcat is running on headless Linux/Unix, then it must be started along with the Xvfb framework, with acommand like:
#!/bin/bash
/etc/service/xvfb/run &
catalina.sh run
WebClient Admin Console
The approach described above is applicable also the the WebClient Admin Console.
1. Make a copy of webclient-admin-server.war from the isCOBOL SDK to Tomcat's webapps folder
2. In webclient-admin.properties
a. set the property webclient.server.websocketUrl to
ws://localhost:<port>
with the port that Tomcat is running on
b. set the webclient.connection.secret property to match the setting in webclient.properties
c. set webclient.server.websocketUrl to the WebClient server's websocket URL (i.e. ws://localhost:8080/webclient-server)
3. Configure the Admin Console URL in webclient.config, i.e.:
"/": {
....,
"adminConsoleUrl" : "http://localhost:8080/webclient-admin-server"
}