Обсуждение:
So far, everyone who's asked me about problems with loading the driver with Servlets had this problem. Setting CLASSPATH doesn't work, but putting the .jar into jre/lib/ext does. Personally I've not done anything with servlets, so it's basically knowing what works for everyone who's asked. Perhaps apache does pass CLASSPATH, but the others don't for some reason. Peter -- Peter Mount Enterprise Support Officer, Maidstone Borough Council Email: petermount@maidstone.gov.uk WWW: http://www.maidstone.gov.uk All views expressed within this email are not the views of Maidstone Borough Council -----Original Message----- From: Joseph Shraibman [mailto:jks@selectacast.net] Sent: Thursday, November 02, 2000 7:23 PM To: Peter Mount Cc: 'waheed rahman'; pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Peter Mount wrote: > > With JSP & Servlets you have to put the postgresql.jar file into the jre's > lib/ext directory. Then the jar file is available as part of the system wide > classpath. > > The reason for this, is that with servlets & JSP, there is no way of setting > CLASSPATH. > There isn't? In Apache Jserv there is. What are you used to using? -- Joseph Shraibman jks@selectacast.net Increase signal to noise ratio. http://www.targabot.com
On my machine here, /usr/local/jdk1.2.2/jre/lib/ext/ -- Peter Mount Enterprise Support Officer, Maidstone Borough Council Email: petermount@maidstone.gov.uk WWW: http://www.maidstone.gov.uk All views expressed within this email are not the views of Maidstone Borough Council -----Original Message----- From: Manika dey [mailto:bithi@plasma.ernet.in] Sent: Friday, November 03, 2000 2:26 PM To: Joseph Shraibman Cc: Peter Mount; 'waheed rahman'; pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] i am using jdk on sun solaris platform , jdk is in the directory /usr/local/jdk so where do i need to put my postgresql.jar to access postgres using java servlets . because when i try to access through servlets i get error ,but when i do the similar operation using jdbc from console everything runs fine. ------------------------------------------------------------------- From:- | Ms. Manika Dey. |Ph.No:--Engineer-SC (Comp. Tech.) | IPR -- 02712 -69276 I.P.R | EXT 336,315BHAT, GANDHINAGAR | Residence -- 079 - 6619967Gujrat-- 382 428 | FAX --- 69017 ------------------------------------------------------------------
In the file called jserv.properties there is a wrapper.classpath variable. This is the classpath for servlets. At least this is what worked in my case (Redhat Linux Release 6, Apache 1.3, Apache JServ 1.1.2). Peter Mount wrote: > So far, everyone who's asked me about problems with loading the driver with > Servlets had this problem. Setting CLASSPATH doesn't work, but putting the > .jar into jre/lib/ext does. > > Personally I've not done anything with servlets, so it's basically knowing > what works for everyone who's asked. Perhaps apache does pass CLASSPATH, but > the others don't for some reason. > > Peter George Koras (gkoras@cres.gr)
Peter Mount wrote: > > So far, everyone who's asked me about problems with loading the driver with > Servlets had this problem. Setting CLASSPATH doesn't work, but putting the > .jar into jre/lib/ext does. > > Personally I've not done anything with servlets, so it's basically knowing > what works for everyone who's asked. Perhaps apache does pass CLASSPATH, but > the others don't for some reason. > It doesn't pass classpath, but it has its own classloader and in jserv.propertiesand the servlet zone files you specify where you want your classes loaded from. -- Joseph Shraibman jks@selectacast.net Increase signal to noise ratio. http://www.targabot.com