jsp编译有问题,大家帮我看看
sbk 2005-08-01 10:31:40 为什么我的java程序能正常编译和运行,而到jsp中就报下面错误,我已经把<%@page import="java.sql.*"%>写了啊,问大虾我这是什么错误啊,怎么解决?
Error: 500
Location: /mmscount/manage/hh.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:25: Ambiguous class: java.beans.Statement and java.sql.Statement
Statement stmt = null;
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:28: Ambiguous class: java.beans.Statement and java.sql.Statement
Statement stmt1 = null;
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:122: Class <>Statement not found in =.
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:122: Incompatible type for =. Can't convert java.sql.Statement to <>Statement.
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:123: Class <>Statement not found in =.
stmt1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:123: Incompatible type for =. Can't convert java.sql.Statement to <>Statement.
stmt1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:125: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
RS=stmt.executeQuery(sql);
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:155: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
RS2=stmt1.executeQuery("select * from mmsqdh where qdh='"+RS.getString("cpid")+"'");
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:256: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
RS1=stmt.executeQuery("select * from mmssub_dz where mphoneno='"+telephone+"'");
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:280: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
RS3=stmt1.executeQuery("select * from mmsqdh where qdh='"+RS1.getString("channel")+"'");
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:379: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
stmt.close();
^
D:\tomcat\work\localhost_8080%2Fmmscount\_0002fmanage_0002fhh_0002ejsphh_jsp_0.java:380: Class <>Statement not found in void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
stmt1.close();
^
12 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:536)