我知道这个问题已经发布了很多次,但是已经发布的每个解决方案都没有解决我的问题,而我的问题是相同的。 我有一个JSP页面,我想在使用标签库,所以我说这行是:如何在JSP页面中使用taglib
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
我的项目与Maven 2运行,所以我包括在pom.xml的这种依赖性也:
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
这里是一个在web.xml行:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee `enter code here`http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
而现在,这里是错误,我得到什么我尝试:
org.apache.jasper.JasperException:L'绝对URI:http://java.sun.com/jsp/jstl/core不能在文件web.xml中或在部署该应用
当我生成项目,还有其他的jar文件来解决仍然没有在网络inf/lib ... 我做错了什么?我的意思是,一旦我有我的配置,我把我的最后一篇文章,我做我的项目“maven构建”,它显示在我的屏幕上“构建成功”,然后我启动tomcat并输入我的ASP的网址,它打印我上面给的错误...
这是我整个的pom.xml因为你告诉我somethind可能出问题吧:
<modelVersion>4.0.0</modelVersion>
<groupId>CapG</groupId>
<artifactId>CapG</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
重要的是,如果jstl jar文件是在WEB-INF/lib下的部署war文件(或爆炸战争)的一部分。确保是这种情况。 –