Massimiliano PASQUALONI wrote:
Guy,
        I've already configured mysql. It correctly work whit Apache and
PHP, I need only to join it whit Tomcat.

The David/s suggestion work fine, if I place the jar file in WEB-INF\lib
directory, Tomcat try to connect.

But, even though I specify the user and password in the connectionURL,
connectionURL =
"jdbc:mysql://localhost:3306/bi?user=myuser;password=mypassword", my Tomcat
return: "Error 500: javax.servlet.ServletException: Access denied for user
''@'localhost' (using password: NO)"

Strongly recommend that you use a JNDI Datasource - it handles connection pooling for you and will provide a *much* better base to build your app on.

In the examples in the JNDI Datasource doc, you supply the username and password as attributes, not in the URL.

I the JNDI Datasource HOW-TO (
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
) I'ved see that I need to configure the server.xml and the web.xml files.
But, I belive, it's a particular specific use of Tomcat and MySql and I
don't need that, I just want a connection whit my application an mysql, not
from the Application Server and Mysql...

The config required is minimal, and offers speed improvements amongst other things. Retrieving a DataSource from JNDI is much quicker than creating a new one every time you want to hit the database.

It's pretty standard to do this, and more unusual not to, in my experience.


rgds

p



P.S. hearty congratulations, I think you are best comunity on the world,
swift, accurate and efficient!



Thanks!






Massimiliano Pasqualoni
http://www.pasqualoni.it



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.83beta3a (ProxSMTP 1.4)
AntiVirus: ClamAV 0.88.4/3224 - Wed May  9 17:25:29 2007
by Markus Madlener @ http://www.copfilter.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to