Re: problem to connect to database - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: problem to connect to database
Date
Msg-id 20040115185232.C25975@bacon
Whole thread Raw
In response to problem to connect to database  (Melanie Bergeron <mbergeron_pg@globeecom.com>)
List pgsql-jdbc
On 15/01/2004 15:49 Melanie Bergeron wrote:
> Hi all!
>
> I really need your help for this.  I installed the JDBC driver on my
> machine by copying the jar file in C:\Program Files\Apache Software
> Foundation\Tomcat 5.0\common\lib\pg73jdbc3.jar and set environment
> variable CLASSPATH to this path.  I  create a JSP page (code below).
> The first time I launched this JSP page, all was ok.  I don't use it
> since last week but when I try to launched it yesterday, I got an error
> to connecting database :

Forget classpath. Tomcat uses its own class loaders. You need to put your
jar file in common/lib. BTW, putting Java code in JSPs is not recommended.
Look at using something like Struts in combination with a persistence
framework like Hibernate or iBatis.

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: Jan de Visser
Date:
Subject: Re: problem to connect to database
Next
From: "Tom Hargrave"
Date:
Subject: Invalid SQL still executes valid sub transactions in Prepared Statement