gpt4 book ai didi

tomcat - JSTL错误javax/servlet/jsp/jSTL/core/LoopTag使用c时出错 :forEach tomcat ver7. 0

转载 作者:行者123 更新时间:2023-11-28 21:46:23 25 4
gpt4 key购买 nike

<分区>

您好,使用
eclipse juno,动态网络项目
apache Tomcat v7.0(它有自己的 jSTL-1.2.1.jar)我得到这个错误

javax.servlet.ServletException: java.lang.NoClassDefFoundError:  javax/servlet/jsp/jstl/core/LoopTag
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

当我尝试运行此 jsp 代码时

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<c:forEach var="test" items="a,b,c">
${test}
</c:forEach>

</body>
</html>

它似乎没有看到 jar 中的 javax.servlet.jsp.jSTL.core.LoopTag 类
我读过一些关于过滤器阻止 javax.servlet 文件的内容

任何帮助将不胜感激


好的,我想我已经找到了解决方案javax.servlet.jsp.jSTL-1.2.1.jar
不包含 javax.servlet.jsp.jSTL.core 类

还需要添加jSTL-1.2.jar

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com