| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 545 人关注过本帖
标题:[求助]jsp连接SQL错误
只看楼主 加入收藏
woohyuk
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-10-24
收藏
 问题点数:0 回复次数:1 
[求助]jsp连接SQL错误

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:48: cannot resolve symbol
symbol  : class Connection 
location: class org.apache.jsp.incoming.connectdb_jsp
  Connection con=DriverManager.getConnection(url,"sa","123");
  ^


An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:48: cannot resolve symbol
symbol  : variable DriverManager 
location: class org.apache.jsp.incoming.connectdb_jsp
  Connection con=DriverManager.getConnection(url,"sa","123");
                 ^


An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:49: cannot resolve symbol
symbol  : class Statement 
location: class org.apache.jsp.incoming.connectdb_jsp
  Statement
  ^


An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:50: cannot resolve symbol
symbol  : variable ResultSet 
location: class org.apache.jsp.incoming.connectdb_jsp
smt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        ^


An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:50: cannot resolve symbol
symbol  : variable ResultSet 
location: class org.apache.jsp.incoming.connectdb_jsp
smt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
                                                        ^


An error occurred at line: 2 in the jsp file: /incoming/connectdb.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\news\org\apache\jsp\incoming\connectdb_jsp.java:51: cannot resolve symbol
symbol  : class ResultSet 
location: class org.apache.jsp.incoming.connectdb_jsp
  ResultSet rs;
  ^
6 errors



	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
	org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

搜索更多相关主题的帖子: SQL jsp 
2005-10-24 13:26
EA_Games
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:539
专家分:0
注 册:2005-3-13
收藏
得分:0 
能贴点连接数据库的源代码吗?(导入java.sql.*包了没?)

2005-10-26 21:23
快速回复:[求助]jsp连接SQL错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020755 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved