连接tomcat时出现以下信息,不知哪有错误,请看一看

haibei 2001-08-28 08:34:10
2001-08-28 08:17:25 - ContextManager: Adding context Ctx( /examples )
Starting tomcat. Check logs/tomcat.log for error messages
2001-08-28 08:17:25 - ContextManager: Adding context Ctx( /admin )
2001-08-28 08:17:25 - ContextManager: Adding context Ctx( )
2001-08-28 08:17:25 - ContextManager: Adding context Ctx( /test )
2001-08-28 08:17:26 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2001-08-28 08:17:26 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
运行到
ment=c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
是出错,语法没有问题,提示不能解析,我想与上面的tomcat有关系
...全文
53 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
haibei 2001-08-28
错误如下:
suess

Error: 500
Location: /out.jsp
Internal Servlet Error:

javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.AbstractMethodError
at _0002fout_0002ejspout_jsp_38._jspService(_0002fout_0002ejspout_jsp_38.java:81)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

说明能连数据库,运行ment=c.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,
java.sql.ResultSet.CONCUR_READ_ONLY);
时就出错了
回复
haibei 2001-08-28
<%@ page import="java.sql.*" %>
<%
//声明
java.sql.Connection c;
java.sql.Statement ment;
java.sql.ResultSet rs;
try{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
out.print("suess");
out.print("<br>");
}
catch(Exception E){
out.print("unable to load driver.");
}
c =DriverManager.getConnection("jdbc:mysql://192.168.0.1:3306/test","root","root");
ment=c.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,
java.sql.ResultSet.CONCUR_READ_ONLY);
c.close();
ment.close();
%>
回复
secball 2001-08-28
ment=c.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,
java.sql.ResultSet.CONCUR_READ_ONLY);
用这句试试(你自己看看有什么区别吧)。
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-08-28 08:34
社区公告
暂无公告