Skip Navigation

Configure ORDS for Oracle APEX on Apache Tomcat

In the most basic configuration, the ORDS server will be started as a standalone server. But if you need to deploy the ORDS server using Apache Tomcat, please read below.
The steps to install APEX and start a standalone ORDS server is available in the below link

Once you have a working standalone ORDS setup, it can be integrated with Tomcat using the steps given below:

Create tomcat user

[root@linux ]# adduser tomcat
[root@linux ]# chown -R tomcat:tomcat /u01/app/ords
[root@linux ]# cd /u01/app/ords


Prepare ords.war and images

If you already have the ords.war and images, those can be reused with Tomcat. Otherwise prepare the ords.war and images files as suggested in the above linked guide

java -jar ords.war

Download and install Tomcat

Download Tomcat from here.
Create the tomcat directory and extract the downloaded file to this directory as tomcat user

[root@linux]# mkdir -p /u01/app/tomcat
[root@linux]# chown -R tomcat:tomcat /u01/app/tomcat/
[root@linux]# su tomcat
[tomcat@linux]$ cd /u01/app/tomcat/
## copy tomcat file to this directory
[tomcat@linux tomcat]$ tar zxvf apache-tomcat-9.0.16.tar.gz

Add these lines to tomcat user's .bash_profile file


Start up Tomcat web server

[tomcat@linux tomcat]$ /u01/app/tomcat/apache-tomcat-9.0.26/bin/

Open the VM ports as well as the subnet ports on the Cloud console security lists or filrewall to allow connections to the port 8080

[root@linux tomcat]# iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
[root@linux tomcat]# service iptables save
[root@linux tomcat]# service iptables reload

At this point, your basic Tomcat installation should be working fine, and serving a generic tomcat homepage once you access the URL http://<VM_IP>/8080

Configure tomcat to start during the server boot-up process

[root@linux tomcat]#   vi /etc/init.d/tomcat

Paste this inside the file

# description: Start up the Tomcat servlet engine.
. /etc/init.d/functions
sleep 60  #make sure the DB is up
case "$1" in
if [ -f $CATALINA_HOME/bin/ ];
echo $"Starting Tomcat"
/bin/su tomcat $CATALINA_HOME/bin/
if [ -f $CATALINA_HOME/bin/ ];
echo $"Stopping Tomcat"
/bin/su tomcat $CATALINA_HOME/bin/
echo $"Usage: $0 {start|stop}"
exit 1
exit $RETVAL

Add the script to the runlevel environment level 3 and 5

[root@linux tomcat]#   chmod 755 /etc/init.d/tomcat
[root@linux tomcat]#   cd /etc/rc3.d
[root@linux tomcat]#   ln -s /etc/init.d/tomcat S80tomcat
[root@linux tomcat]#   cd /etc/rc5.d
[root@linux tomcat]#   ln -s /etc/init.d/tomcat S80tomcat

Add APEX war to Tomcat

Copy the APEX images to the Tomcat “webapps” directory. This should be done as tomcat user

[tomcat@linux tomcat]$   mkdir -p /u01/app/tomcat/apache-tomcat-9.0.26/webapps/i/
[tomcat@linux tomcat]$   cp -R /u01/app/apex/images/* /u01/app/tomcat/apache-tomcat-9.0.26/webapps/i/

Copy the ORDS application ords.war to the Apache Tomcat. This should be done as tomcat user

[tomcat@linux tomcat]$   cp /u01/app/ords/ords.war /u01/app/tomcat/apache-tomcat-9.0.26/webapps/

You should now be able to access the APEX admin page at: the URL http://<VM_IP>/8080/ords

Add a comment