Changing the context root in the Linux Tomcat bundle

Optionally, you can change the context root used by your Studio application.

When you first install the bundle, it uses the default context root of "/", and you get access to Studio by going to http://localhost:8080/. If you change the context root to "sales", then the URL would be http://localhost:8080/sales.

Note that any change to the context root only affects the Studio application. Components and other hooks still use their default context paths.

To change the context root:

  1. Stop the server.
  2. Rename endeca-portal/tomcat-6.0.36/conf/Catalina/localhost/ROOT.xml file to <context root>.xml.

    For example, if your context root is sales, the file name should be sales.xml.

    For multi-level context paths, separate the name with #. For example, for a context path of /sales/east, the file name should be sales#east.xml.

  3. Modify the XML file created in the previous step as needed:
    • For a root context: <Context path="" />
    • For a context of /sales: <Context path="/sales"/>
    • For a context of /sales/east: <Context path="/sales/east"/>
  4. Rename the endeca-portal/tomcat-6.0.36/webapps/ROOT directory to endeca-portal/tomcat-6.0.36/webapps/<context root>.

    For multi-level context paths, use a multi-level path such as: endeca-portal/tomcat-6.0.36/webapps/sales#east.

  5. Edit the endeca-portal/portal-ext.properties file.

    Find the portal.ctx property at the beginning of portal-ext.properties.

    Change the value of this setting to be the same context root value you used above.

    Do not include a trailing slash in the portal.ctx value. For example, use this value:

    portal.ctx=/sales/east

    Do not use this value:

    portal.ctx=/sales/east/
  6. Restart the server.