| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2217 人关注过本帖
标题:JSP连接数据库问题,请帮帮我!
只看楼主 加入收藏
cassel96
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-1-8
结帖率:0
收藏
 问题点数:0 回复次数:0 
JSP连接数据库问题,请帮帮我!
JSP连接数据库问题,请帮帮我!

1.JDK装好了,C:\Program Files\Java\jdk1.6.0_10\bin
2.Tomcat装好了,C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
3.环境变量配好了,classpath:C:\Program Files\Java\jdk1.6.0_10\lib\mysql-connector-java-5.1.7-bin.jar;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;D:\mysql-connector-java-5.1.7\mysql-connector-java-5.1.7-bin.jar
path:C:\Program Files\StormII;C:\Program Files\Java\jdk1.6.0_10\bin;
4.mysql装好了,MySQL Server 5.1
5.mysql-connector-java-5.1.7-bin.jar放在D盘下,并且我在C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\DB\WEB-INF也放了。
6.JSP代码也写好了放在C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\DB\Db.jsp

可是运行时,就是通不过,我把浏览器的错误代码附上,请帮帮我,我怎么做才能连上数据库,谢谢您!!!


HTTP Status 500 -  

--------------------------------------------------------------------------------

type Exception report

message  

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

exception  

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause  

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:600)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause  

java.lang.ClassNotFoundException: org.apache.jsp.Db_jsp
(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
(Unknown Source)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
搜索更多相关主题的帖子: JSP 数据库 
2010-04-22 21:30
快速回复:JSP连接数据库问题,请帮帮我!
数据加载中...
 
   



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

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