There have been several questions concerning glassfish's alternatedocroot property, but I've not seen this issue addressed -- serving up static content from a drive other than the one glassfish is running on.
We are using glassfish v3.1 running on Windows (several versions 7,8, server 2003, server 2008, server 2012) and use the alternatedocroot property under virtual servers (in domain.xml) to serve up static content. We used to have the property in the application's sun-web.xml file, but moved it (removing the application context) to the server level for business reasons.
This has worked fine, but we now have a site where the static content will be on a different drive from glassfish, mapped to, say, X:. Just referencing the mapped drive does not work:
A typical reference to the content would be:
http://abc.com:8080/inv/100/100_01.jpg
While this worked fine when the drive was the same as that on which glassfish was running, the mapped drive causes an HTTP 502 response of Connection Failed.
We have tried other ways of referencing the other drive including:
dir=//servername/path
dir=file://servername/path
dir=file://X:/path
but to no avail.
Does anyone know how to get glassfish to provide access to static content that is on a drive other than the one glassfish is running on?