I'm deploying a webapp (WebApp.war, say) using the Maven Glassfish Plugin. Rather than it being deployed to http://localhost/WebApp I want it to be deployed to http://localhost/AnotherName - that is, I want to change the context root it's deployed to. I can't work out how to do this with the plugin, is it an option?
Context Root is defined by XML files in the WAR. Check the sun-web.xml, which should define this.
When you are using Netbeans you can select the context root under the project properties/run. When you deploy it via Glassfish admin you can enter it there.