Hi all,

For a while my web app was connecting manually to the db but obviously
that's a bit rubbish so I looked at some examples and moved the db stuff
into the context file for my app.  I have never written a context file and
I think I may have missed something.

Now when I use ant to install my app, it sometimes fails - ant says
"successful build" but tomcat throw an exeption that my app "conspiracy"
cannot be found under /webapps/conspiracy  - it isn't being installed from
that location - ant installs it from my build dir outside of the tomcat
folder entirely.

If this was happening all the time, it would be more understandable but
roughly 50% of the time (and every time i re-type "ant remove install"
immediately after a fail) it installs fine.

I imagine that I need to do something to my context xml file?  I'm not
really sure but the only change in the app pre and post this error is
moving the db stuff to the xml file.

The xml file is attached:
<?xml version='1.0' encoding='utf-8'?>
<Context crossContext="true" debug="5" docBase="conspiracy" path="/conspiracy" reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_conspiracy_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/conspiracy_db" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/conspiracy_db">
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/conspiracy_db?autoReconnect=true</value>
</parameter>
<parameter>
<name>validationQuery</name>
<value>select now()</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value>password</value>
</parameter>

<parameter>
	<name>removeAbandoned</name>
	<value>true</value>
</parameter>
<parameter>
	<name>removeAbandonedTimeout</name>
	<value>60</value>
</parameter>
<parameter>
	<name>logAbandoned</name>
	<value>true</value>
</parameter>
</ResourceParams>
</Context>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to