I am using Payara Server, Community Edition, and wish to define an alternatedocroot property so as to serve a web page defined outside my application. I can make this work by adding a property to glassfish-web.xml, such as:
<property name="alternatedocroot_1" value="from=/tutorials/* dir=C:srvExtSTAR"/>
However, I'm running into an issue because while my application is developed under Windows, it is deployed to Linux, so I need a different path for the value of the "dir" attribute depending on whether I'm trying to run the application in my development environment or build it for deployment. My hope is that instead of defining the property in my application, I could instead add it to the server configuration. However, while I did see a hint somewhere that that could be done, I have been unable to make it happen. Is this possible to do, and if not, is there any alternative strategy available that would let me accommodate both my development and deployment environments without having to remember to change the configuration when that's necessary?
EDIT: There is actually documentation here that indicates this can be done, but I am still unable to make it work this way.
question from:
https://stackoverflow.com/questions/65893756/can-alternatedocroot-property-be-defined-in-payara-glassfish-server 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…