How can I change the ContextRoot that Maven Glassfish Plugin deploys to?

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?

maven-2,plugins,glassfish,

2

Ответов: 2


1 accepted

Context Root is defined by XML files in the WAR. Check the sun-web.xml, which should define this.


1

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.

maven-2,plugins,glassfish,
Похожие вопросы