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

Reply via email to