How to install ORDS and rename it to APEX

Biljana Jelić
5 min readApr 9, 2019

While creating complex applications within Oracle Application Express (APEX)it might happen that an Oracle Database needs to be exposed to the RESTful Web, or the application itself might have to interact with other databases by creating client-side API requests. In either of the two cases mentioned it will certainly be needed to install Oracle REST Data Services (ORDS) which enables turning an Oracle database into a modern RESTful API Service.

REST access to data is a common requirement for most web applications, so by using Oracle REST Data Services (ORDS) together with Oracle Application Express (APEX) the database will be turned into a fully functional hub, enabling a quick build of REST API services.

Installing Oracle REST Data Services (ORDS) and deploying it to an application server would create a URL path in the form of http://server/ords. If it is a requirement to change the URL from http://server/ords to http://server/somethingelse it is necessary to rename the ords.war file before deployment. The most common scenario, that will be covered in this article, is renaming ORDS to APEX, and because Oracle APEX is installed before Oracle REST Data Services it is preferable to keep the consistency by leaving the URL that is already being used http://server/apex.

This article is a tutorial that demonstrates, step by step, how to install ORDS and rename it to APEX on a GlassFish Application Server.

Follow the steps:

  1. Download ORDS installation file and extract it to the hard drive:

2. Rename ords.war file into apex.war file.

Keep in mind that this is the key step because name must be changed before deployment since ORDS URL is composed as:<warfile>

3. Install ORDS through CMD(run as administrator). After you run CMD you have to navigate to created ORDS folder as follows:

cd C:\ords

Run the installation command:

java -jar apex.war

(in our case Java environment was not set so the command is:)

c:\Program Files\Java\jdk1.7.0_80\bin\java” -jar apex.war

In installation processes you need to enter the following parameters (example):

  • Name of configuration folder: config
  • Database server name: servername
  • Database port: 1521
  • Service name or sid (1/2): 1
  • Service name: upgraded
  • PL/SQL Gateway: 1
  • APEX_PUBLIC_USER pass: Apex!xy
  • Application express Restful: 1
  • APEX_LISTENER pass: Apex!xy
  • Standalone or exit (1/2): 2

4. Copy apex image files (from Apex installation or from database server) to a new-created ORDS folder:

5. Create static war for images (css, js..) by running the following command:

java -jar apex.war static C:\ords\images

(in our case Java environment was not set so the command is:)

“c:\Program Files\Java\jdk1.7.0_80\bin\java” -jar apex.war static C:\ords\images

6. Deploy on GlassFish server. Log in to an admin console (https://localhost:4848).

In “Application” section deploy new application apex.war

Context Root: apex

Application name: apex

7. Repeat the step for i.war (but without Context root)

That should be it. It might happen that some changes on Glassfish server were not successfully saved, so while running Apex this error might appear:

In that case you need to check Context Root information under “Applications” section in the menu on the left side. Context Root contains the web context root for the application or web application that was packaged as a WAR file. In this tutorial it was shown how to deploy apex.war on Glassfish so Context Root should be apex, but as we can see on the picture below, some part are missing. It is important to check yellow highlighted part in the picture below.

As a solution, we can rename apex.war to new.war and deployed it again.

Now we have all elements that we need ( yellow highlighted on the picture) so we can just rename “Context Root” into apex.

After saving all changes, Apex link works and has the correct URL!


If you have already finished the installation with one name (e.g. /ords), you should repeat all the steps from these instructions in order to create a new name (e.g. /apex) because renaming .war file before deployment is the key part.

Applications being used in this article:

  • Oracle Application Express (Oracle APEX) version 5.2
  • Oracle REST Data Services (ORDS) version 3.0
  • Glassfish Server Open Source Edition 3.1.1

Thank you for reading.