Hi,
I am unable to load the database driver inside the servlet. The
following are my configurations -
Apache JServ 1.05b
Apache Web Server 1.3.6
OS Windows NT Workstation 4.0 SP4
The oracle database driver "classes111.zip" is in my CLASSPATH system
variable. The code is attached below -
*********************************************
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
....
....
Connection sqlconn;
String driver, url, user, password;
ResultSet rs = null;
Statement stmt = null;
driver = "oracle.jdbc.driver.OracleDriver";
url = "jdbc:oracle:thin:@sam:1526:orcl";
user = "john";
password = "john";
String query = "select * from JOB_INFO";
try
{
Class.forName(driver);
}
catch(ClassNotFoundException e)
{
out.println("<P> Could not load database driver : " +
e.getMessage());
}
...
out.close();
************************************************
This code snippet runs without problem when I run in a standalone java
program. But inside the servlet, I get the ClassNotFoundException,
which means it is not able to find or load the classes111.zip, the
oracle driver.
Is there any other configuration that I need to get this going ?
Thanks in advance for any suggestions.
-Depankar
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]