Developing for Java Web default context path is generated from artifact’s name without your extension.
For example, if artsmanBlog.war
is an artifact, the context path will be artsmanBlog
:
http://localhost:8080/
artsmanBlog
Working with Wildfly 20.0.1.Final, change the context path is easy:
- Create a xml file named
jboss-web.xml
- Put it inside of the WEB-INF
- Define the new context path inside
context-root
tag
Like below:
1 |
|
Now, the context path will be myCustomContextRoot
:
http://localhost:8080/
myCustomContextRoot
xoff.