A problem sometimes encountered when using Oracle Application Express Listener, is getting a blank page displayed when attempting to access an Oracle Application Express (APEX) page. For example getting a blank page when trying to display http://server:port/apex/
. The cause of this problem is not having the APEX static resources configured properly. This leads to the JavaScript and CSS resources required by APEX not being found, and the APEX page failing to render correctly.
Any of the following can cause this issue to occur:
i.war
on WebLogic/GlassFishjava -jar apex.war static
command to generate i.war
/i
) and not specifying the same context path (via the --context-path
option) when using java -jar apex.war static
.i.war
after deploying i.war
--static-images
optioni.war
to point to the static resources for the new APEX version, or in Standalone Mode forgetting to update the location by using the --apex-images
option.Assume your APEX deployment is located at http://example.com/apex/ and your static resources have been deployed at http://example.com/i/, then try accessing the following url:http://example.com/i/apex_version.txt
If you get a 404 Not Found
error then you need to double check points 1-6 in the list above, i.war
is not deployed or is not pointing at a folder containing APEX static resources. Otherwise a plain text file will be displayed with contents like the following:```
Application Express Version: 4.2.1
#### Curing the problem
Consult the Oracle Application Express Listener for detailed documentation on how to create and deploy `i.war`. See instructions for [WebLogic here](http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/install.htm#CBHFGHBD), and [GlassFish here](http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/install.htm#CHDIIIGA). You can get detailed help on the `static` listener command by typing the following at a command prompt:```
java -jar apex.war help static
For Listener 1.1.x the deployment process for i.war
required zipping all the APEX static resources into i.war
and then deploying the resultant i.war
. The problem with this approach is that if the contents of the APEX static resources are updated (for example to add some custom style sheets), then i.war
needs to be recreated and redeployed. In 2.0 we leverage capabilities in WebLogic and GlassFish (described in more detail in a previous post) to create an i.war
which does not actually contain the static resources, but instead points to the folder containing the static resources. The advantage of this approach is that the static resources can be updated and the updates are immediately picked up by the server without requiring any restarting or redeploying of i.war