This is the fourth and last blog post of a series of installing Oracle XE, Application Express, ORDS and Tomcat. Please look at the last three blog posts before, to get more information about these subjects. Here now the topic is Tomcat, therefore please download at first Apache Tomcat
(current version number -> Binary Distributions -> Core -> 32-bit/64-bit Windows Service Installer) and make sure you have also downloaded and installed a Java Virtual Machine.
After double clicking at the downloaded
apache-tomcat-8.5.5.exe file, Tomcat will start and you should click “Next”. Please agree with the terms and conditions. It follows a selection of some components. I leave it as it is and click at “Next”.
Then select some ports, service name and Tomcat administrator login. For instance:
Please remember, i have disabled during the post installation steps of installing Oracle XE the XML-DB HTTP Server port. This means we can set Tomcat’s HTTP/1.1 Connector Port to 8080 without any issues.
Click “Next” and select the path for your Java Virtual Machine.
Now you have to choose a Tomcat destination folder and click at “Install”.
Tomcat will be installed and after few seconds you will get this kind of picture:
Click at “Finish” and Tomcat will start.
There are several ways to check if Tomcat is up and running. My personal preference is the service command tool in a DOS box.
For example with:
sc query tomcat8
As you can see in this picture “STATE: 4 RUNNING”, the installation seems to be fine.
To start and stop Tomcat is pretty simple. You need local admin rights to fulfil these commands in a DOS box.
net start tomcat8 net stop tomcat8
Next, you have to copy two more things. One is the
ords.war file, what i have configured/prepared in the last blog. Copy this file to the
\webapps folder in Tomcat. You need local administrator rights too, to do this task.
D:\Oracle\ORDS\ords.22.214.171.1247.08.01> copy ords.war "C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ords.war"
Take a look at this image, there is an
ords directory as well. This is the deployment step and will be accomplished after copying the
ords.war file to
\webapps folder, when the Tomcat Server is up and running.
Second, copy the folder
\images from Apex directory to the same
\webapps directory in Tomcat and rename it to
\i. For example with:
D:\Oracle\Apex\apex_5.0.4\apex> xcopy .\images "C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\i" /e /i
And again, you need local adminstrator rights to accomplish the copy task. Lastly it must look like this:
Make the following browser test to see that the image directory
\i will be used.
Preparation of APEX_PUBLIC_USER
The purpose for this user is mainly to handle the connection between the Java servlet ORDS and the database. For security reasons APEX_PUBLIC_USER has been given minimal database privileges. Only
CREATE SESSION and DMLs against
WWV_FLOW_FILE_OBJECTS$ table have been granted. You can verify these limited privileges via these two statements.
SELECT * FROM dba_sys_privs WHERE grantee = 'APEX_PUBLIC_USER';
SELECT owner , privilege ||' on '|| table_name ||' to ' || grantee grantee , grantor, table_name FROM dba_tab_privs WHERE grantee = 'APEX_PUBLIC_USER';
Now you have to unlock the account and setting the password for this user. It must be the same which you have set during the ords.war configuration.
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER identified by [password];
This password has to be the same what you have set during the questionnaire for
APEX_PUBLIC_USER. See table 1 of ORDS Installation.
Now restart the Tomcat Server via these DOS commands in a DOS box.
net stop tomcat8 net start tomcat8
At last call this URL: http://localhost:8080/ords/ and you will get the Apex Login Page.
|Password||same as for sys and system user, what you have set during Oracle XE installation.|
Now you are able to create new workspaces for your applications. Furthermore, if you want to change the admin password, you can do this with the script
apxchpwd.sql from Apex-Home Directory in SQL*Plus.