Deploy BuildVu with Tomcat
Table of contents
Building the web app
- Download and install the latest version of Tomcat. (Versions tested: 8.5.x, 9.0.x)
- Build a copy of our BuildVu Microservice Example project. Instructions can be found on the GitHub page.
Deploying the web app
- Copy the built .war file into the apache-tomcat-x.x.x/webapps/ directory.
- Tomcat will then automatically deploy the application upon startup, using the name of the .war file as the context path.
- Outside the tomcat installation create a directory called ‘docroot’ and two subdirectories inside it named ‘input’ and ‘output’.
- For example, your folder structure should look similar to:
┣━━ docroot ┃ ┣━━ input ┃ ┗━━ output ┗━━ tomcat ┣━━ webapps ┗━━ <other tomcat files>
- For example, your folder structure should look similar to:
- Open a command line/terminal window and navigate to apache-tomcat-x.x.x and run the command bin/startup which will start the server on port 8080.
- Check the RUNNING.txt file supplied with Tomcat for detailed instructions.
- You can check if the web app has successfully deployed by navigating to its URL in your browser e.g. http://localhost:8080/buildvu-microservice. The page displayed should be blank white with “BuildVu Microservice Example” written in the centre.
Usage
You can interact with the BuildVu Microservice Example using the REST API (See the GitHub page for details).
For specific languages, see our tutorials.
Note: Viewing / downloading the converted output may not work on the first try - this is usually because Tomcat has not yet registered the new directories created by the web app. To fix this, simply restart your Tomcat server.