Re: problem to connect to database

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: Melanie Bergeron <mbergeron_pg(at)globeecom(dot)com>
Cc: "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: problem to connect to database
Date: 2004-01-15 18:52:32
Message-ID: 20040115185232.C25975@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |
+------------------------------+---------------------------------------------+

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Martin Holz 2004-01-16 07:38:07 Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Previous Message Jan de Visser 2004-01-15 18:42:46 Re: problem to connect to database