自足的猿
2018-04-17 13:14
采纳率: 50%
浏览 2.6k
已采纳

出现内部错误 jsp连接数据库

错误码Type Exception Report

Message org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.WebRoot._001_jsp

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.WebRoot._001_jsp
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:572)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.WebRoot._001_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:381)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

java.lang.ClassNotFoundException: org.apache.jsp.WebRoot._001_jsp
java.net.URLClassLoader.findClass(URLClassLoader.java:381)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:59)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:381)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/9.0.7

代码
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>



SELECT ����

url="jdbc:mysql://localhost:3306/runoob?useUnicode=true&characterEncoding=gb2312"
user="root" password="ppnn13%"/>


SELECT * from websites;
/sql:query

JSP ���ݿ�ʵ�� - ����̳�

ID վ���� վ���ַ


  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • niaonao 2018-04-18 02:44
    已采纳

    tomcat lib包缺少jstl.jar,jsp页面使用该标签没,需要引入jar;
    或者是版本问题,jdk版本一致,还不行驱动包换个版本试试

    已采纳该答案
    打赏 评论
  • qq_37056794 2018-04-17 14:33

    缺少连接数据库的驱动jar包

    打赏 评论
  • Rosexue 2018-04-17 14:42

    连接数据库的驱动jar包,lib文件下。。。

    打赏 评论

相关推荐 更多相似问题