Tomcat 5.0.14 server.xml problem.

kmthien

Senior member
Oct 8, 2002
363
0
0
Hi,

I got the following added to server.xml:
====================================================

<Context path="/TLIntranet" docBase="TLIntranet" debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="TLIntranet_log."
suffix=".txt" timestamp="true"/>
<Resource name="jdbc/OfficeDB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/OfficeDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>180</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>username</name>
<value>officeuser</value>
</parameter>
<parameter>
<name>password</name>
<value>13467982</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://192.1.3.139:3306/officedb?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>

</Host>
</Engine>
</Service>
</Server>

============================================================

But when I added one more context as below:

============================================================

<Context path="/Advanced" docBase="Advanced" debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="Wrox_Advanced_log."
suffix=".txt" timestamp="true"/>
<Resource name="jdbc/BooksDB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/BooksDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>180</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>username</name>
<value>booksuser</value>
</parameter>
<parameter>
<name>password</name>
<value>bookspass</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://192.1.3.139:3306/books?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>


and tried to restart tomcat, it can't start. Pls help !! Thanks in advance !
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
What did you use to edit the xml file? Are you sure the file is a valid xml document?
 

kmthien

Senior member
Oct 8, 2002
363
0
0
Yes...I m very very sure that it's a valid XML file !! Don't worry be happy !!
 

kmthien

Senior member
Oct 8, 2002
363
0
0
help..................................pls..........................................