Setting Up the Java RESTful Engine (Windows and Linux) 21.0.0

Our Java RESTful engine can be hosted on a Windows or Linux machine under a Tomcat server. The engine utilizes the Spring Boot REST API Framework. The setup instructions for the engine are the same for both platforms.

What You Will Need

To get the Java RESTful Engine running on your machine, you will need:

  • A Windward RESTful Engine license key (if you don't have one, you can sign up for a trial here)
  • The latest version of the Java RESTFul installation
  • Install Java 8 on your machine or server
  • A Tomcat Server (V9) instance set up on your machine. If you are not familiar with Tomcat, follow this link to learn more.
    • Make sure you download the 32-bit/64-bit Windows Service Installer for the easiest setup

Setting Up Java RESTful Engine on Tomcat Server

1. Make sure you have a Tomcat Server (version 9) up and running.

2. Navigate to your Tomcat installation:

  • On Windows, it will most likely be here: C:\Program Files\Apache Software Foundation\Tomcat 9.0
  • On Linux, it will most likely be here: /opt/apache-tomcat-9.0.39 

3. If the server is currently running, shut it down by navigating to the /bin directory

  • On Windows, run the shutdown.bat batch file
  • On Linux, run the shell script

4. Navigate to the /Tomcat/webapps directory

5. Delete the ROOT directory in the /Tomcat/webapps directory

6. Now extract the "JavaRESTful-{version.number}.zip" file you downloaded earlier, and then navigate to the {version.number} directory. In there you will find:

  • App_Data directory
  • ROOT.war file
  • JavaRESTfulengine-{version.number}.pom file
  • Windward Combined Software License Agreement 4-8-21.pdf

7. Move the contents of the {version.number} directory into the /Tomcat/webapps directory

8. Now you can start the server by navigation to /Tomcat/bin

  • On Windows, run the startup.bat batch file
  • On Linux, run the shell shell script.

9. The Java RESTful engine is now hosted on the Tomcat server under the root address you used during the Tomcat setup.  Read the next section to see what to do with the Windward RESTful Engine license key

  • If you are running the server on a Virtual Machine, you will be able to access the service via the machines public DNS.

Using the License Key

The Java RESTful engine accepts the license key in two ways. You can either set it globally in the engine's properties file, or set it on a per request basis where you pass it as a header in the request.

  1. To set it globally in the projects properties file:
    1. After the Tomcat server is running with the JavaRESTful Engine,  navigate to /Tomcat/webapps/ROOT/WEB-INF/classes.
    2. Open
      • Change the value of the property "license" to your license key
    3. Now the JavaRESTful Engine will use that license key for all requests.
  2. To pass the license key as a request header for per request use:
    1.  The key value for the header is "X-WINDWARD-LICENSE " and the value is your license key.
    2. You can use this if you wanted to use different license keys for different requests.

Property Files

There are 3 total property files relevant to the Java RESTful Engine, you will find all of them in the /Tomcat/webapps/ROOT/WEB-INF/classes directory:

    • This is the properties file for the Spring Boot REST API framework used. You can find a list of commonly used properties here.
  3. log4j2.xml
    • This is the properties file for the logger. You can find some more information here.

We ship these property files with the values we intended on using. Changing some values we have set may affect the expected behavior of the engine.

Log File

As shipped, the Java RESTful Engine will write its log to the file "JavaREST.log" in the /Tomcat/logs directory.


Add your comment

E-Mail me when someone replies to this comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.