我有这个错误。
javax.el.ELException: Cannot convert false of type class java.lang.String to class com.vocabase.objects.dialog.modules.Module
at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:553)
at org.apache.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:47)
关于此代码。
<c:forEach items="${param}" var="tmp">
<c:set var="tab" value="${fn:split(tmp.key,'.')}" />
<c:set var="start" value="${tab[0]}" />
<c:set var="type" value="${tab[1]}" />
<c:set var="language" value="${tab[2]}" />
<%String type=(String)pageContext.getAttribute("type");
System.out.println(type);
pageContext.setAttribute("type", type);%>
<log:debug>saving ${tab}</log:debug>
<c:if test="${start=='object'}">
<c:choose>
<c:when test="${param.onglet=='audition'}">
<c:choose>
<c:when test="${empty language}">
<% if("inputTimeout".equals(type)){%>
<!-- inputTimeout -->
<c:set target="${answerManage}" property="inputTimeout" value="${tmp.value}" />
<%}else if("noInput1Management".equals(type)){%>
<!-- noInput1Management -->
<c:set target="${answerManage.noInput1}" property="management" value="${model:getPromptManagement(tmp.value)}" />
<%}else if("noInput2Management".equals(type)){%>
<!-- noInput2Management -->
<c:set target="${answerManage.noInput2}" property="management" value="${model:getPromptManagement(tmp.value)}" />
<%}else if("noInput3Management".equals(type)){%>
<!-- noInput3Management -->
<c:set target="${answerManage.noInput3}" property="management" value="${model:getPromptManagement(tmp.value)}" />
<%}else if("finalNoInputManagement".equals(type)){%>
<!-- finalNoInputManagement -->
<c:set target="${answerManage.finalNoInput}" property="management" value="${model:getPromptManagement(tmp.value)}" />
<%}else if("whatIsNext".equals(type)){%>
<!-- whatIsNextNoInput -->
<c:if test="${!(tmp.value=='empty')}">
<c:set var="direction" value="${tmp.value}" />
<c:set var="whatIsNextNoInput" value='<%=DirectionType.valueOf( pageContext.getAttribute("direction").toString())%>' />
<c:set target="${answerManage}" property="whatIsNextNoInput" value="${whatIsNextNoInput}" />
</c:if>
<%}else if("moduleToCallNoInput".equals(type)){%>
<!-- moduleToCallNoInput -->
<c:set var="whatIsNext" value='<%=request.getParameter("object.whatIsNext")%>' />
<c:choose>
<c:when test="${tmp.value!='empty' && whatIsNext=='moduleCall'}">
<c:set var="tmp" value="${fn:split(tmp.value, '.')}" />
<!-- id.type -->
<c:set var="module" value="${model:getModuleByType(tmp[0],tmp[1])}" />
<c:if test="${!empty module}">
<c:set target="${answerManage}" property="moduleToCallNoInput" value="${module }" />
</c:if>
</c:when>
<c:otherwise>
<c:set target="${answerManage}" property="moduleToCallNoInput" value='<%=null %>' />
</c:otherwise>
</c:choose>
<%}else{%>
<!-- repeatNoInput1,2,3 || repeatChoiceNoInput1,2,3 -->
<c:set target="${answerManage}" property="${type}">
<c:choose>
<c:when test="${tmp.value=='on' }">true</c:when>
<c:otherwise>false</c:otherwise>
</c:choose>
</c:set>
<%}%>
</c:when>...
好的错误是
<c:choose>
<c:when test="${tmp.value=='on' }">true</c:when>
<c:otherwise>false</c:otherwise>
</c:choose>
我不知道如何修复它。错误发生在带有tomcat 8.5的java 8上,它是项目形式java 6的更新,其中包含tomcat 6。我需要一些想法,因为我尽可能地尝试但错误就在那里。
谢谢你, 维拉德。