Would you have other applications running in tomcat?
-----Original Message-----
From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 14:54
To: Tomcat Users List
Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
On Tuesday 02 July 2002 14:00, Les Hughes wrote:
> Two things,
>
> In your server.xml
> user I think should be username
> and
> driverName has been deprecated in favour of url which needs the servername
> and DB name as well
> (as in something like jdbc:postgresql://full.server.name/mybookdb <- or
> whatever the DB is called)
Ok. Now my configuration file looks as follows:
<Context path="/bookstore1" docBase="bookstore1" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_bookstore1_log." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/BookDB" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/BookDB">
<parameter>
<name>username</name>
<value>java</value>
</parameter>
<parameter>
<name>password</name>
<value>java</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:postgresql://willow.forest/public</value>
</parameter>
</ResourceParams>
</Context>
> Are you *sure* you're using the right install of TC and that the server.xml
> has no reference to the hsql driver?
I'm absolutely sure. I even reinstalled whole tomcat (to cleanup everything)
> BTW - only got this working with Oracle and mySQL so most of this is
> guesswork based on those two exercises.
>
> Bye,
>
> Les
> P.S. You shouldn't open the connection in init() nor cache the connection
> BTW - use a pool instead :)
For sure I will, but now all that I want is to connect my servlet to database.
regards
przem
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
**** DISCLAIMER ****
"This e-mail and any attachments thereto may contain information
which is confidential and/or protected by intellectual property
rights and are intended for the sole use of the recipient(s) named above.
Any use of the information contained herein (including, but not limited to,
total or partial reproduction, communication or distribution in any form)
by persons other than the designated recipient(s) is prohibited.
If you have received this e-mail in error, please notify the sender either
by telephone or by e-mail and delete the material from any computer.
Thank you for your cooperation."
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>