If you need to configure a custom error page instead of the error page generated by Oracle REST Data Services (ORDS), then do the following:
- Edit the
defaults.xml
file in the ORDS configuration folder -
Add the following setting to
defaults.xml
:<entry key="error.externalPath">/path/to/error/pages/folder/</entry>
/path/to/error/pages/folder
is the fully qualified path to a folder which contains files named with the following pattern{status}.html
, where{status}
is the HTTP status code that you wish to define a custom error page for.- For example if you wish to define a custom error page for the HTTP 404 – Not Found status and store it in a folder named
/usr/local/share/ords/error-pages/
then create a file named404.html
in/usr/local/share/ords/error-pages/
and configureerror.externalPath
to point at/usr/local/share/ords/errro-pages/
.