Re: Accessing PG DB using jdbc

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Gupta, Sahil" <SGupta2(at)webmd(dot)net>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Accessing PG DB using jdbc
Date: 2003-11-08 22:54:15
Message-ID: NEBBLAAHGLEEPCGOBHDGGEIGJFAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Assuming the authorization is already set up on the remote machine, you can
just add the hostname to your URL in this format:

jdbc:postgresql://host/database

If you are making the connection from your servlets in the Tomcat
environment then the same method works (Just make sure the "web" user also
has access to the database.) I believe there is also a way to set up a
datasource in current versions of Tomcat, but I don't know how to do it via
that method.

Here are a couple of FAQs that might be helpful:

http://www.fankhausers.com/postgresql/jdbc/

http://www.fankhausers.com/tomcat/jdbc/

-Nick

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org]On Behalf Of Gupta, Sahil
Sent: Friday, November 07, 2003 12:42 PM
To: 'pgsql-jdbc(at)postgresql(dot)org'
Subject: [JDBC] Accessing PG DB using jdbc

Hi all,
I am trying to set up postgres for my latest project and have tested the db
locally using the postgre jdbc driver. What i was planning on doin was to
try to access the postgres server remotely as in the production env, the db
might reside on a different machine. Could someone guide me to how i should
go about doin this. Also, i would like to find out the set up for similar
situation on tomcat.
All help will be appreciated.
Thanks

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-11-09 04:37:04 Re: ResultSetMetaData.isNullable() returns always unknown
Previous Message Nick Fankhauser 2003-11-08 22:48:10 Re: problem connecting to jdbc