How to change the context url in jboss or wildfly
Normally when we create a new war or ear, for example demo-project.war or demo-project.war inside demo-project.ear. The context root or url ...
https://www.czetsuyatech.com/2014/03/wildfly-change-context-url.html
Normally when we create a new war or ear, for example demo-project.war or demo-project.war inside demo-project.ear. The context root or url to which we can access the web application is:
http://localhost:8080/demo-project
But what if we want to change context root or in this case demo-project to let's say "demo" only.
Steps:
1.) In the web project create a new file: src/main/webapp/WEB-INF/jboss-web.xml
2.) Enter the following content
http://localhost:8080/demo-project
But what if we want to change context root or in this case demo-project to let's say "demo" only.
Steps:
1.) In the web project create a new file: src/main/webapp/WEB-INF/jboss-web.xml
2.) Enter the following content
<jboss-web> <context-root>demo</context-root> </jboss-web>
2 comments
Is it possible to add multiple context roots?
My requirement is to use same application with 2 context roots.
Eg: localhost:8080/app1/ & localhost:8080/app2/
Hi, to do that you might want to use an apache server in front.
Post a Comment