How to change the root URL with Maven


An application with root name ‘myproject’ will have the following URL: ‘http://localhost:8080/myproject’.

I want change my URL to: ‘http://localhost:8080/mysite’.

How can I do that? With Maven.Add the code below in your pom.xml file:


It’s not more than that.

Add comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tag Cloud