如何通过Maven包含JSTL1.2实现?

如何通过Maven包含JSTL1.2实现?,maven,jstl,Maven,Jstl,在尝试使用JSTL时,maven出现了一个奇怪的错误: <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> 或 如果您使用的应用程序服务器已经提供了JSTL实现,那么将提供的添加到您的定义中就足够了,否则

在尝试使用JSTL时,maven出现了一个奇怪的错误:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>


如果您使用的应用程序服务器已经提供了JSTL实现,那么将
提供的
添加到您的定义中就足够了,否则您可以尝试添加


org.glassfish.web
jstl impl
1.2

你看过吗?嗯,maven对此很满意。谢谢你的回答。但是Tomcat拒绝了:(您尝试了哪种替代方法?第二种方法是否真的在您的应用程序中包含jstl impl jar?如果Tomcat对第一种方法不满意,我猜它没有提供jstl实现。您能发布任何看起来相关的错误消息吗?
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/jsp/jstl/core/LoopTagSupport
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/jsp/jstl/core/ConditionalTagSupport