tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tent Pig <>
Subject Configuring TOMCAT to use different ROOT context
Date Fri, 22 Jun 2007 13:54:15 GMT
Hi everyone.

I'm sorry if this seems like a newbie question,
unfortunately I'm a complete neophyte when it comes to
tomcat setup and configuration.

I have a user who manages website content, setup and
administration of the linux server falls upon me. On
this web server my user has several websites hosted
via apache virtual hosts. She would like to start
incorporating JSP pages into her sites.

I installed an configured the module on
apache -- works great. I created a few 'test.jsp'
pages and put them in $TOMCAT_HOME/webapps/ROOT and
was able to access them by going to
http://mysite/test.jsp. Thus, Tomcat seems to be
working file, and apache is correctly handing off the
requests to tomcat which is responding correctly.

Although my user would like to integrate JSP pages
into her websites, she wants to be able to maintain
all her files within the DocumentRoot folders of her
virtual hosts -- she doesn't want to have to update
both the DocumentRoot folder of the apache virtual
hosts and the "webapps" directory structure of Tomcat
with her JSP pages.

Plus, she has different JSP pages for each virtual
host and doesn't want to 'mix and match' them. In
other words, if 'myfile.jsp' is only available on
virtualhost1, she doesn't want someone to be able to
go to http://virtualhost2/myfile.jsp, as she has me
restrict access to various virtual hosts by IP subnet.

So, to start off I attempted to update Tomcat's
'server.xml' to change the default context to point to
the same DocumentRoot folder, but this apparently
doesn't work (or, more appropriately, I'm not doing it

I had googled various phrases on how to do this, and I
found a lot of useless information, or references to
files/clauses in various config files that no longer
exist. The information I found, when I attempted to
use it, didn't work.

For what its worth, I currently have CentOS 5 running,
which has apache 2.2.3 and tomcat 5.5.23.

I reviewed the Tomcat help pages, which provide nice
syntaxical information, but seem to fall short in
providing me lots of useful examples on how to
accomplish what I'm trying to do.


Can someone provide me with a brief example of how I
configure Tomcat to look for JSP pages within each
virtual hosts's DocumentRoot directory structure, and
how to keep each virtual hosts's applications



Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message