hi,
i hope this is the right forum to ask...
i try to connect an oracle DB with JSP using thin driver but doesn't work...
my jsp page is this:
-----
<HTML>
<%@ page import="java.sql.*,java.util.*" %>
<%
String url="jdbcracle:thinSERVERNAME:1521BNAME";
Connection con;
Statement stmt;
ResultSet rs;
Class.forName ("oracle.jdbc.driver.OracleDriver"
con = DriverManager.getConnection(url,"scott","tiger"
stmt=con.createStatement();
%>
<%
%>
<select name="ltpid">
<%
try{
rs= stmt.executeQuery("SELECT * FROM AGENDA"
while (rs.next()){
%>
<option Value=<%=rs.getString(1)%>> <%=rs.getString(2) %> </option>
<%
}
}
catch(Exception e){}
%>
</select>
<br>
TEST DONE!
</HTML>
-----
i included in the webserver classpath the path for classes12.jar
but the web server answer with this exception:
-----
[15/Mar/2002:12:45:17] info ( 756): /test/connect.jsp: init
[15/Mar/2002:12:45:17] failure ( 756): Internal error: servlet service function had thrown ServletException (uri=/test/connect.jsp): javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver, stack: javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
at _jsps._test._connect_jsp._jspService(_connect_jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
, root cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at com.iplanet.server.http.servlet.NSServletLoader.findClass(NSServletLoader.java:209)
at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:106)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at _jsps._test._connect_jsp._jspService(_connect_jsp.java:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
-----
Please HELP...
i hope this is the right forum to ask...
i try to connect an oracle DB with JSP using thin driver but doesn't work...
my jsp page is this:
-----
<HTML>
<%@ page import="java.sql.*,java.util.*" %>
<%
String url="jdbcracle:thinSERVERNAME:1521BNAME";
Connection con;
Statement stmt;
ResultSet rs;
Class.forName ("oracle.jdbc.driver.OracleDriver"
con = DriverManager.getConnection(url,"scott","tiger"
stmt=con.createStatement();
%>
<%
%>
<select name="ltpid">
<%
try{
rs= stmt.executeQuery("SELECT * FROM AGENDA"
while (rs.next()){
%>
<option Value=<%=rs.getString(1)%>> <%=rs.getString(2) %> </option>
<%
}
}
catch(Exception e){}
%>
</select>
<br>
TEST DONE!
</HTML>
-----
i included in the webserver classpath the path for classes12.jar
but the web server answer with this exception:
-----
[15/Mar/2002:12:45:17] info ( 756): /test/connect.jsp: init
[15/Mar/2002:12:45:17] failure ( 756): Internal error: servlet service function had thrown ServletException (uri=/test/connect.jsp): javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver, stack: javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
at _jsps._test._connect_jsp._jspService(_connect_jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
, root cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at com.iplanet.server.http.servlet.NSServletLoader.findClass(NSServletLoader.java:209)
at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:106)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at _jsps._test._connect_jsp._jspService(_connect_jsp.java:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
-----
Please HELP...