]
RH Bugzilla Integration commented on WFLY-3100:
-----------------------------------------------
Kabir Khan <kkhan(a)redhat.com> changed the Status of [bug
ClassCastException in JSPs where spring-web tags and jstl tags are
used
-----------------------------------------------------------------------
Key: WFLY-3100
URL:
https://issues.jboss.org/browse/WFLY-3100
Project: WildFly
Issue Type: Bug
Components: EE, Web (Undertow)
Affects Versions: 8.0.0.Final
Reporter: abhishek vijra
Assignee: Shelly McGowan
Labels: jsp, jstl
Fix For: 8.1.0.CR1, 8.1.0.Final
Attachments: spring-fun.war
Following JSP with spring tags
<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
<%@ taglib prefix="c"
uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="spring"
uri="http://www.springframework.org/tags" %>
<html>
<head><title>Simple jsp page</title></head>
<body>
<c:set var="hasError" value="${param.hasError}" />
<c:set var="msg" value="${param.msg}" />
<c:if test="${param.hasError=='true'}">
Message: <spring:message text="${param.msg}"/>
</c:if>
</body>
</html>
breaks following error
ERROR [org.springframework.web.servlet.tags.MessageTag] (default task-1)
org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to
javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects:
java.lang.ClassCastException: org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot
be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects
at
javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects.getImplicitObjects(ImplicitObjectELResolver.java:608)
[jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
at
javax.servlet.jsp.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:169)
[jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:95)
[jastow-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.jasper.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:32)
[jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.el.ELResolverImpl.getValue(ELResolverImpl.java:78)
[jastow-1.0.0.Final.jar:1.0.0.Final]
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116)
[javax.el-3.0.0.jar:3.0.0]
at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.0.jar:3.0.0]
at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.0.jar:3.0.0]
There are two jars (jboss-jsp-api_2.3_spec-1.0.0.Final.jar and
jboss-jstl-api_1.2_spec-1.0.4.Final.jar) that are incompatible with each other due to a
bug -- both are storing an object in the same place, but the objects are not compatible.
The result is that a jsp page cannot contain both JSTL and Spring tags, or it will get
that error.