mtrc
mtrc

Reputation: 1345

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?

Upvotes: 2

Views: 2233

Answers (2)

Albert
Albert

Reputation: 11

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.

Upvotes: 1

mtrc
mtrc

Reputation: 1345

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

Upvotes: 1

Related Questions