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