From: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
---|---|
To: | "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: jdbc servlets and jsp |
Date: | 2003-09-09 07:36:57 |
Message-ID: | 20030909083657.A2393@bacon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 |
+------------------------------+---------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Yang Soon Chiao | 2003-09-09 11:08:56 | postgres- connection refuse |
Previous Message | Nick Fankhauser | 2003-09-09 03:46:53 | Re: jdbc servlets and jsp |