Hey!
You don't say what servlet engine you are using. But you must have the
DB driver classes in the engine's classpath. WebSphere allows one to use
the system classpath or the servlet engine's class path. Make sure you
know what path is being used.
You can look around in your admin.config, but this may be specific for
WebSphere. Your engine may be different.
Or you can write a small servlet that does something like this:
java.util.Properties props = System.getProperties();
enum = props.propertyNames();
Then iterate on this enumeration with this:
name = (String) enum.nextElement();
props.getProperty(name)
That should get you all of your properties and I believe the
classpath will be there.
Good luck.
Sans adieu,
Danny Rubis
j2ee2 j2ee2 wrote:
> I am using apache under linux, and the database is postgresql.
>
> I am trying to retrieve data from a database using jdbc. However it always throw a
>ClassNotFound exception when I try to run this code
> " Class.forName("postgresql.Driver");
>
> I use the same code for a java application, it's works. But use this code in
>Servlet, it do not works at all.
>
> thanks
>
> Send FREE April Fool's Greetings to your friends!
> http://www.whowhere.lycos.com/redirects/American_Greetings.rdct
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html