Thursday, March 12, 2015

How to set up set your context-path to be / on JbossEAP 6.1.0

These steps are easier to understand if you already have an application deployed and you want to move that to use context-path as / instead the app name on the context-path.

In order to accomplish this we need to do some things on our application and on our Jboss installation:

These are the steps you need to do to make this happen:

  • Change your application.xml to set up context-root follows:
  • do similar on web.xml 
  • Change your .xml server deployment file located at $JBOSS_HOME/standalone/configuration/ and set enable-welcome-root to false

  • Create a Symbolic Link for ROOT.war to point to your war at the following path: $JBOSS_HOME/standalone/deployment/

    • If you are on Linux it is as simple as this:  
      ln -s $JBOSS_HOME/standalone/deployments/app/app.ear/app.war ROOT.war
    • Then do create a file at the same path called: ROOT.war.deployed the content does not matter so you can just do touch ROOT.war.deployed
    If you have made all those changes you are done, and you will be able to see your app running on http://yourhost:port/ 

    This information can be found also at which is the jboss official forum.

Post a Comment