Alternate docroot Does Not Work For The Default Web Module If Set Using Admin Console Or domain.xml File In Oracle GlassFish Server
(Doc ID 1470612.1)
Last updated on FEBRUARY 27, 2019
Applies to:Oracle GlassFish Server - Version 3.1.2 and later
Information in this document applies to any platform.
The alternate docroot is set in the Admin GUI as follows under instance-config ->Virtual Server->Server
and a new property "alternatedocroot_1" is added with the following values:
This alternatedocroot_1 will cause access to the URI like "/images/sample.jpg" to serve the static image file located as "C:/Temp/MyImages/images/sample.jpg.
Now a sample application "hello" (hello.war) is deployed to use images from the above directory. This works fine if the hello application is accessed as http://<host:port>/hello. In fact, the images located under /images can be accessed directly through the browser as http://<host>/images/sample.jpg
However, when the "hello" application is set as the default web application (or deployed with context-root as "/") from the virtual server. the images are no longer accessible. It behaves as the alternate docroot for "/images/*" is lost.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document