Introduction 

This blog explains how to convert a standalone ORDS 24.1 deployment (using the embedded Jetty server) to a Tomcat 9-based deployment. Deploying ORDS on Tomcat improves scalability, resource management, and aligns with enterprise best practices. 

Objective 

The goal is to transition from the standalone ORDS server to Tomcat 9, enabling better control over Java options, easier SSL configuration, and standard web application deployment. 

 

High-Level Steps 

  1. Download and extract Tomcat 9 
  1. Stop the running standalone ORDS service 
  1. Generate the ORDS WAR file using ./ords war command 
  1. Copy the WAR file into Tomcat’s webapps directory 
  1. Create setenv.sh to set ORDS config and Java options 
  1. Define necessary environment variables for ORDS and Tomcat 
  1. Start Tomcat and verify ORDS access in a browser 

 

How Do We Solve 

Step 1: Download and Extract Tomcat 9
Download Tomcat 9 from the official Apache website and untar the archive: 

tar -xvf apache-tomcat-9.0.xx.tar.gz
 

 

Step 2: Stop the Standalone ORDS Service
Stop the ORDS Jetty server by terminating the process: 

CTRL + C
# Or if running in background:
pkill -f ords
 

 

Step 3: Generate the ORDS WAR File
Navigate to your ORDS binary directory and run: 

./ords war /path/to/output/ords.war
  

This will create the ords.war file using your current configuration. 

 

 

 

Step 4: Copy the WAR File to Tomcat
Copy the generated WAR file into Tomcat’s webapps directory: 

cp /path/to/output/ords.war /path/to/tomcat/webapps/
 

 

Step 5: Create setenv.sh in Tomcat’s bin/ Directory
Create a setenv.sh file to set the ORDS configuration directory and Java options: 

export ORDS_CONFIG=/path/to/ords/config
export JAVA_OPTS=”-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M”
 

Make the file executable: 

chmod +x setenv.sh
 

 

Step 6: Define Environment Variables
Add the following environment variables in your shell profile or Tomcat startup script: 

export ORDS_HOME=/path/to/ords/home
export ORDS_CONFIG=/path/to/ords/config
export JAVA_HOME=/path/to/java11
export PATH=$JAVA_HOME/bin:$PATH
export CATALINA_HOME=/path/to/tomcat
export CATALINA_BASE=$CATALINA_HOME
 

 

Step 7: Start Tomcat and Verify
Start Tomcat: 

/path/to/tomcat/bin/startup.sh
 

Access ORDS in a browser: 

http://<hostname>:<port>/ords/
 

You should see the ORDS landing page and be able to access REST endpoints. 

 

Conclusion 

Migrating ORDS 24.1 from standalone to Tomcat simplifies management and aligns with production standards. With setenv.sh and proper environment variables configured, the deployment becomes flexible, scalable, and ready for integration into enterprise web infrastructures. 

Recent Posts

Start typing and press Enter to search