3 Replies Latest reply: Oct 19, 2012 9:48 AM by Obed Murillo RSS

    How to set the context path to / instead of /store?

    Obed Murillo
      Hi All,

      I am trying to change the context path of my atg application to be / instead of /store

      I am using ATG10.0.2 and jboss-5.1.0.GA, I tried changing the following but did not worked.

      I changed the web.xml to be

      I created a jboss-web.xml with this code inside
      <?xml version="1.0" encoding="UTF-8"?>

      I also tied the change at /META-INF/application.xml


      I read the above info at;:

      And I found this at the atg documentation

      I changed the MANIFEST.MF of my app to be

      ATG-Web-Module: j2ee-apps/store/store.war
      ATG-Context-Root: /

      But none of those options worked.

      I just want to accomplish the following:
      change from htttp://www.ocorpws.com/store to htttp://www.ocorpws.com/ (This an example is not the actual site)

      I will really appreciate your help.

        • 1. Re: How to set the context path to / instead of /store?
          Nitin Khare
          What you have done for changing the context root to "/" is all fine but it is important to know that there is a ROOT.war in the deploy folder of JBoss which by default gets bound to "/" context. You must be getting the error message like "Web mapping already exists for deployment" when you would be starting your JBoss server after changing your context root to "/". So either you can completely remove the ROOT.war from the deploy folder or change the context-root of ROOT.war by updating its web.xml like:

          <display-name>Welcome to JBoss</display-name>
          Welcome to JBoss
          <servlet-name>Status Servlet</servlet-name>

          and also update the jboss-web.xml of ROOT.war:


          I hope this serves your purpose.

          There can be a workaround also by modifying the index.html of ROOT.war in the deploy folder of your server and redirect request to your web application using meta refresh like:
          <meta http-equiv="refresh" content="0;URL='/store'">
          • 2. Re: How to set the context path to / instead of /store?
            Obed Murillo
            Thank you Nitin,

            I will try it now, I will back with you as soon as I am done.

            • 3. Re: How to set the context path to / instead of /store?
              Obed Murillo
              Hi Nitin,

              That worked, now I have to solve other problems, I have some static assets at Root.war folder.