Re: problem to connect to database
От | Paul Thomas |
---|---|
Тема | Re: problem to connect to database |
Дата | |
Msg-id | 20040115185232.C25975@bacon обсуждение исходный текст |
Ответ на | problem to connect to database (Melanie Bergeron <mbergeron_pg@globeecom.com>) |
Список | 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 по дате отправления: