Instead of using the embedded Jetty server to serve its REST API, you can host Doradus in the Apache Tomcat server. The folder doradus-tomcat contains interface source files, a web.xml file, and a pom.xml build file. (Currently, this project only supports Maven builds.) To use the Tomcat interface, use the following steps:
1)
2) Copy the latest doradus.yaml file from ./doradus-server/src/main/resources to ./doradus-tomcat/src/main/resources.
3)
4) The provided web.xml file allows Doradus REST commands to respond to ROOT URIs (no prefix) or the special prefix _api. For example, if Doradus runs as ROOT, the “list applications” command will be:If Doradus is assigned the URI prefix _api, the “list applications” command will be:If you’d like to use a different API prefix, modify web.xml and add a section such as the following:<url-pattern>/Fuzzy/*</url-pattern>
5) Generate the war file by compiling doradus-tomcat using pom.xml in the root folder. If Doradus will use no URI prefix, use the following command:If Doradus will use a URI prefix, change ROOT to the appropriate prefix name.
6)
7)
8) Start Tomcat from the <TOMCAT_HOME>/bin folder, e.g., with ./catalina.sh run on Mac or Linux or just catalina for Windows. The doradus-tomcat war file will be expanded automatically when Tomcat starts.Note that the doradus.log file should appear in the <TOMCAT_HOME>/bin folder.