You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dennis Harris <dh...@q5systems.com> on 2007/11/21 17:58:54 UTC

Tomcat 6 Configuration with Contexts - Need Help?

I’m having some issues with configuring Tomcat 6. I’m moving from Tomcat 4.1 and in version 4 I had multiple contexts setup in the SERVER.XML file like so:

 

<Context path="/app1" docBase="app1" debug="0" reloadable="true" crossContext="true">

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"

                        driverName="sun.jdbc.odbc.JdbcOdbcDriver"

                        connectionURL="jdbc:odbc:app1db"

                         connectionName="admin" 

                        connectionPassword="password" 

                        digest="SHA"

                         userTable="PPMUser" userNameCol="UserName" userCredCol="UserPassword"

                         userRoleTable="PPMUser" roleNameCol="RoleTomcat" />

</Context>

 

<Context path="/app2" docBase="app2" debug="0" reloadable="true" crossContext="true">

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"

                        driverName="sun.jdbc.odbc.JdbcOdbcDriver"

                        connectionURL="jdbc:odbc:app2db"

                         connectionName="admin" 

                        connectionPassword="password" 

                        digest="SHA"

                         userTable="PPMUser" userNameCol="UserName" userCredCol="UserPassword"

                         userRoleTable="PPMUser" roleNameCol="RoleTomcat" />

</Context>

 

However, in version 6 this is not working correctly. I’ve read that for each environment I would need to have a CONTEXT.XML file – so nothing would go into the SERVER.XML file. Just wondering how do I go about configuring this? Do I add my configurations in the CONTEXT.XML file that’s in the conf directory?

 

Hope someone can shed some light on this. 

 

Thanks.


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.2/1143 - Release Date: 11/21/2007 10:01 AM
 

RE: Tomcat 6 Configuration with Contexts - Need Help?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Dennis Harris [mailto:dharris@q5systems.com] 
> Subject: Tomcat 6 Configuration with Contexts - Need Help?
> 
> However, in version 6 this is not working correctly. I've 
> read that for each environment I would need to have a 
> CONTEXT.XML file - so nothing would go into the SERVER.XML 
> file. Just wondering how do I go about configuring this? Do I 
> add my configurations in the CONTEXT.XML file that's in the 
> conf directory?

First, try reading the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

And no, you would not put your app-specific configuration in
conf/context.xml - that's global, shared by all webapps.  By the way,
the names are case sensitive, so capitalizing them won't work.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org