tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umesh Bhatt <umesh_bh...@mindtree.com>
Subject RE: Auth in Context.xml
Date Thu, 09 Jun 2011 08:36:03 GMT
Hi,

Sorry I meant auth not Auth.  Thanks for correction.
I used getConnection(username, password) but it gives me an error as "It is not supported"
and doesn't connect with DB.

Thanks,
Umesh

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Thursday, June 09, 2011 10:44 AM
To: Tomcat Users List
Subject: RE: Auth in Context.xml

> 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


________________________________

http://www.mindtree.com/email/disclaimer.html

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


Mime
View raw message