我在嘗試使用JSTL時遇到了一個奇怪的錯誤:如何通過Maven包含JSTL 1.2實現?
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
我認爲這是因爲它不是具體的實現。看起來像Glassfish中有一個具體的實現,但我不知道如何包含它。
我得到的錯誤是:
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
你看過http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html嗎? – artbristol