hi there,
I had the following codes on my JSP page:
<html>
<head><title>Stored Procedure Call using JDBC</title></head>
<body>
To test JDBC call to fire stored procedure named <b>sp_GetClatTypeIE</b>
<%! Class.forName("oracle.jdbc.driver.OracleDriver"); %>
<%@ page language="java" import="java.sql.*, java.math.*, java.io.*" %>
<%
try{
String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Connection conn = DriverManager.getConnection(url, "tux", "tux");
CallableStatement cs = conn.prepareCall(scall);
cs.registerOutParameter(2, Types.VARCHAR);
cs.setInt(1, 22555);
cs.execute();
cs.close();
conn.close();
String output = cs.getString(2);
} catch (SQLException e) {
System.err.println("Error: " + e.getMessage());
}
out.println("Result is: " + output);
%>
</body>
</html>
and when i run it on my Tomcat 3.3a (Sun), i get this error returned:
org.apache.jasper.JasperException: Unable to compile
/software/jakarta-tomcat-3.3a/work/DEFAULT/ROOT/SpTest_2.java:12: Type expected.
Class.forName("oracle.jdbc.driver.OracleDriver");
^
1 error
at org.apache.tomcat.facade.JasperLiaison.javac(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(Unknown Source)
at org.apache.tomcat.facade.JspInterceptor.requestMap(Unknown Source)
at org.apache.tomcat.core.ContextManager.processRequest(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:484)
whats wrong? please help me!
Thanks
Regards,
Neo Gigs ========
VB?http://communities.msn.com.my/VisualBasicwithNeohttp://www.vbcity.com/forumhttp://www.vbweb.co.ukGet
paid cash receive email?http://www.MintMail.com/?m=1414418 Reading SMS got
paid?http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348 Malaysianshop.com
http://www.malaysianshop.comMore Traffic?
http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1================================================
Note:This is intended to addressees only, if you wanna be removed, let me know.