We recently switched to Glassfish 3.1.2.2 and you have several web applications packaged as war files. Sometimes the desired root context for these applications is different from the file name.
Back when we used Weblogic, we achieved this by declaring the root context in weblogic.xml, like this
<context-root>path/to/our/App</context-root>
We noticed that the same tags exist in glassfish-web.xml. But no matter what we define there, the server always defines the file name as context-root.
Now we find the --contextroot option in the asadmin utility, which will allow us to overwrite the file name during deployment, but we would prefer to define it directly in the archive itself so that the one who deployed it at the end does not need to know the desired root end.
Is there any way to achieve this?
source
share