jstl使用报错?
我引入jstl标签后启动就报错了?
HTTP Status 500 – Internal Server Error
Type Exception Report
Message org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_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.index_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.index_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.index_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.
正在回答 回答被采纳积分+1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>慕课网用户管理中心</title> <link rel="stylesheet" href="lib/bootstrap-3.3.7-dist/css/bootstrap.min.css"> <script src="lib/2.2.4/jquery-1.12.4.min.js"></script> <script src="lib/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="row"> <div class="page-header"> <h1>慕课网后台管理系统 <small>用户数据管理中心</small></h1> </div> </div> <div class="row"> <div class="jumbotron"> <h1>MyBatis基础入门课程!</h1> <p>通过一个项目来完成基础部分的学习</p> </div> </div> <div class="row"> <table class="table table-hover table-striped"> <tr> <th>用户编号</th> <th>登录账号</th> <th>用户昵称</th> <th>邮箱</th> <th>联系方式</th> <th>用户状态</th> <th>操作</th> </tr> <c:forEach var="user" items="${usersList}"> <tr> <td>${user.id}</td> <td>${user.username}</td> <td>${user.nickname}</td> <td>${user.email}</td> <td>${user.phone}</td> <c:if test="${user.userStatus == 0}"> <td>正常</td> </c:if> <c:if test="${user.userStatus == 1}"> <td>锁定</td> </c:if> <c:if test="${user.userStatus == 2}"> <td>删除</td> </c:if> </tr> </c:forEach> </table> </div> </div> </body> </html>
index.jsp:
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>慕课网用户管理中心</title> <link rel="stylesheet" href="lib/bootstrap-3.3.7-dist/css/bootstrap.min.css"> <script src="lib/2.2.4/jquery-1.12.4.min.js"></script> <script src="lib/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="row"> <div class="page-header"> <h1>慕课网后台管理系统 <small>用户数据管理中心</small></h1> </div> </div> <div class="row"> <div class="jumbotron"> <h1>MyBatis基础入门课程!</h1> <p>通过一个项目来完成基础部分的学习</p> <p><a class="btn btn-primary btn-lg" href="#" role="button">查看更多,请上慕课网</a></p> <p><a class="btn btn-primary btn-lg" href="${pageContext.request.contextPath}/addusers.jsp" role="button">新增用户</a></p> </div> </div> <div class="row"> <table class="table table-hover table-striped"> <tr> <th>用户编号</th> <th>登录账号</th> <th>用户昵称</th> <th>邮箱</th> <th>联系方式</th> <th>账号创建时间</th> <th>用户状态</th> <th>操作</th> </tr> <c:forEach var="user" items="${usersList}"> <tr> <td>${user.id}</td> <td>${user.username}</td> <td>${user.nickname}</td> <td>${user.email}</td> <td>${user.phone}</td> <td> <fmt:formatDate value="${user.createTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate> </td> <c:if test="${user.userStatus == 0}"> <td>正常</td> </c:if> <c:if test="${user.userStatus == 1}"> <td>锁定</td> </c:if> <c:if test="${user.userStatus == 2}"> <td>删除</td> </c:if> </tr> </c:forEach> </table> </div> </div> </body> </html>
- 参与学习 人
- 提交作业 277 份
- 解答问题 4297 个
Java数据库开发的必备技能,从流行的MySQL数据库开始,到Java原生的数据库管理接口JDBC的使用,再到常用的数据持久化框架MyBatis,让你向Java工程师的目标又迈进了一步!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星