Re: jdbc servlets and jsp - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: jdbc servlets and jsp
Date
Msg-id 20030909083657.A2393@bacon
Whole thread Raw
In response to Re: jdbc servlets and jsp  (Luke Vanderfluit <luke@chipcity.com.au>)
List pgsql-jdbc
On 09/09/2003 04:16 Luke Vanderfluit wrote:
> thanks for your reply :-)
> I'm a student trying to get java talking to a postgresql database.
> My first step is to get the several components talking to each other.
> So far I have got regular java classes talking to the database,
> my question was about getting jsp and servlets talking to the database
> using tomcat. That should be possible, though not desirable in a
> production environment perhaps, as you pointed out.

Well, if your doing something simpler that a full-blown j2ee application,
I'd suggest loading the driver in your servlet's init method. Copy (or
symlink) the JDBC driver into Tomcat's common/lib directory and you should
be fine. I'd suggest putting the db url/userid/password in web.xml as
parameters to your servlet.

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: jdbc servlets and jsp
Next
From: "Yang Soon Chiao"
Date:
Subject: postgres- connection refuse