tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Auth in Context.xml
Date Thu, 09 Jun 2011 05:14:02 GMT
> From: Umesh Bhatt [mailto:umesh_bhatt@mindtree.com] 
> Subject: RE: Auth in Context.xml

> I am using Tomcat 6.0.

6.0.what?  There are 32 versions of 6.0; be precise.

> In Context.xml file

Again, if you have a file named Context.xml, it will be ignored.  Files must be named (and
located) properly for Tomcat to use them.  Exactly what is the file name, where is it located,
and what are the full contents of the file?

> I found JDBC resource configuration as below.

> <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
>                maxActive="100" maxIdle="30" maxWait="10000"
>                username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
>                url="jdbc:mysql://localhost:3306/javatest"/>

> It has Auth attribute 

No, it has an auth attribute, not Auth; everything here is case-sensitive, so get it right.

> I don't want to use tomcat to setup connection rather want my 
> application to setup connection with DB.

Still fooling yourself into thinking it's safer to bury the password in the application than
in the configuration file?  Waste of time.  But if you insist on doing it, use the getConnection()
method that has userid and password as arguments.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message