File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes where to copy in tomcat ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "where to copy in tomcat ?" Watch "where to copy in tomcat ?" New topic

where to copy in tomcat ?

Nash Jetts

Joined: Apr 22, 2005
Posts: 4
I copied it to <TOMCAT_HOME>/common/lib, but it gives a runtime error during execution of the servlet.

Pasted below is the error - here is the code I am using,
Connection conn =
DriverManager.getConnection("jdbc racle ci8:@database","scott","tiger");
String strQuery = "select * from scott.EMP" ;
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(strQuery);
String strName = rs.getString("ENAME");
out.println(strName + "<BR>");



javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver

Nash Jetts,<br />SCJP 1.4, SCWCD (on-my-way!)
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Try changing the extension from ".zip" to ".jar"

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nash Jetts

Joined: Apr 22, 2005
Posts: 4
yes it worked !!! I renamed from zip to jar and placed in <TOMCAT_HOME>/common/lib

Thanks Ben!
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
You should probably be using classes12.jar, which is intended for Java 2 applications. See the Oracle documentation.
I agree. Here's the link:
subject: where to copy in tomcat ?
It's not a secret anymore!