struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sai Reddy" <dubbaka...@gmail.com>
Subject Why should we keep
Date Tue, 22 Jan 2008 18:39:50 GMT
Hi Friends,
I'm using Struts 1.2.7, Tomcat 5.5.25. I'm trying to create a datasource for
my struts application.

This is my struts-config.xml file

########################################################################
<struts-config>
    <data-sources>
        <data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
            <set-property property="driverClassName"
value="com.mysql.jdbc.Driver" />
            <set-property property="url"
            value="jdbc:mysql://localhost:3306/test?autoReconnect=true" />
            <set-property property="username" value="root" />
            <set-property property="password" value="santhosh" />
            <set-property property="maxActive" value="10" />
            <set-property property="maxWait" value="5000" />
            <set-property property="defaultAutoCommit"  value="false" />
            <set-property property="defaultReadOnly" value="false" />

        </data-source>
    </data-sources>    
.
.
.
.
</struts-config>
########################################################################

When I place "mysql-connector-java-5.0.3-bin.jar" file in "/WEB-INF/lib"
directory, I get an error saying "com.mysql.jdbc.Driver not found". But when
I place "mysql-connector-java-5.0.3-bin.jar" file in
"$CATALINA_HOME/commons/lib" directory, everything works fine!

Why should we must place the .jar file in "$CATALINA_HOME/commons/lib" only
rather than in "/WEB-INF/lib". Why is Tomcat unable to find when I place it
in "/WEB-INF/lib" folder??

D.Sai Reddy
VNR VJIET.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message