Details
-
Bug
-
Status: Verified
-
Resolution: Unresolved
-
7.0.0 DXP FP17
-
None
-
1
Description
Using EL expression in custom tag file throws exception :
java.lang.ClassCastException: com.liferay.taglib.servlet.PageContextWrapper cannot be cast to org.apache.jasper.runtime.PageContextImpl
at org.apache.jasper.runtime.JspContextWrapper.getELContext(JspContextWrapper.java:327)
at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1012)
at org.apache.jsp.tag.web.demotags.sum_tag.doTag(sum_tag:74)
at org.apache.jsp.index_jsp._jspx_meth_d_sum_0(index_jsp:76)
index.jsp
<%@taglib tagdir="/WEB-INF/tags/demotags" prefix="d" %> Hello <d:sum a="1" b="4" />
sum.tag
<%@tag pageEncoding="UTF-8" isELIgnored="false" body-content="empty" %> <%@attribute name="a" type="java.lang.Long" %> <%@attribute name="b" type="java.lang.Long" %> and the result is ${a+b}.