Re: Question regarding context-root in admin UI
When you deploy the WAR, the context root field is optional. If this
isn't what you want, you can overwrite it, or just empty it out.
If the context root is not specified, then it will be using the one
specified in the web.xml.
This is the same behavior as if you are using the command line to deploy
[--contextroot ] contextroot is optional.
So, just don't fill in the context root, and it will pick up from web.xml.
On 9/19/12 7:21 AM, Noah White wrote:
> When deploying a WAR via the admin UI the context root is automatically set to the name of the WAR file minus the .war extension.
> This is regardless of the presence of a defined in a glassfish-web.xml or a web.xml file.
> If I want to override this behavior I have to manually set the Context Root field in the admin UI to the same value in application's web.xml.
> This becomes an issue when you name your WAR file with version information. For example MyApplication-1.0.1.war or MyApplication-Experimental.war but you want the deployed context root to be version agnostic.
> If you use the asadmin cmd line tool to deploy then it will use the context-root specified in the *web.xml file by default. Much simpler!
> I would like the admin UI to behave the way asadmin does in this regard as it is simpler to deploy. Is there a way to configure things so that it will?