Java 无法解析JSTL绝对URI
当我加载我的网页时,出现以下错误,我正在尝试使用jstl: 绝对uri:无法解析 在web.xml或与此应用程序一起部署的jar文件中 我正在使用ApacheTomcat Web服务器。 这是我的pom.xml maven文件:Java 无法解析JSTL绝对URI,java,maven,jsp,jakarta-ee,Java,Maven,Jsp,Jakarta Ee,当我加载我的网页时,出现以下错误,我正在尝试使用jstl: 绝对uri:无法解析 在web.xml或与此应用程序一起部署的jar文件中 我正在使用ApacheTomcat Web服务器。 这是我的pom.xml maven文件: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.own</groupId>
<artifactId>Web</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
4.0.0
我自己的
你的classpath look是什么样子的?我刚刚上传了一张照片(希望如此)。让Maven制作一个WAR文件。JSTL JAR是否在/WEB-INF/lib
中?如果没有,那么您就知道原因了。它在/WEB-INF/lib中,问题是它正在与JBossServer10(WildFily)o.o一起工作
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>For each</title>
</head>
<body>
Odd numbers up to 20:
<c:forEach var="i" begin="0" end="20" step="2">
${i}
</c:forEach>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>