tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Auth in Context.xml
Date Thu, 09 Jun 2011 08:58:26 GMT
Umesh Bhatt wrote:
> 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.
> 

Umesh,

you would help the people trying to help you, and thus help yourself get answers faster, 
by providing *precise* information about your problem.
If you do not provide precise information, and do not answer questions, it is more 
difficult to help you.  And since the people who try to help on this list do this on their

free time, and also have other things to do (like another $$ job for instance), they will

not feel very motivated to spend extra time getting the information out of you.

Something like "an error as "It is not supported"" does not help.  Copy and paste the 
*real* error messages.
And answer the questions of Charles below.

here is an example of a "good" post :
http://markmail.org/message/ik56qyngekis24bo


> -----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
> 
> 


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


Mime
View raw message