Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > FAQs > How do I control Apache Tomcat's document root?

How do I control Apache Tomcat's document root?

Table of Contents
Background Information

I have a warfile named portal.war and when the RightScale ServerTemplates install it, Tomcat renders the files at instead of at So the document root is in /portal instead of /. How can I modify this setting?

To get started with RightScale, try the Free Edition.



Tomcat will render the app based on its appbase, which is set to /home/webapps/application/releases/working/ where 'application' is the name of your application.

In order to get Tomcat to serve the files based on another context, you need to add the following directive to the web.xml file:

<Context path="/" docBase="/home/webapps/application/releases/working/portal" />

So you should add the following to the server.xml template file, which is attached to the RightScript, WEB TomCat5 configure v5.

<Context path="/" docBase="/home/webapps/@@APPLICATION@@/releases/working/portal" />

Note that "portal" in the above context assumes your warfile is named portal.war. You would replace the word "portal" with your actual warfile name (without the .war extension).

You must to post a comment.
Last modified
21:26, 16 May 2013



This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.