Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jsp自定义标记中的Spring选择标记_Jsp_Spring Mvc_El_Jsp Tags_Jboss 4.0.x - Fatal编程技术网

jsp自定义标记中的Spring选择标记

jsp自定义标记中的Spring选择标记,jsp,spring-mvc,el,jsp-tags,jboss-4.0.x,Jsp,Spring Mvc,El,Jsp Tags,Jboss 4.0.x,我试图在JSP标记中完成以下操作: select.tag <%@ attribute name="id" required="true" %> <%@ attribute name="path" required="true" %> <%@ attribute name="items" required="true" %> <%@ attribute name="itemLabel" required="false" %> <%@ attri

我试图在JSP标记中完成以下操作:

select.tag

<%@ attribute name="id" required="true" %>
<%@ attribute name="path" required="true" %>
<%@ attribute name="items" required="true" %>
<%@ attribute name="itemLabel" required="false" %>
<%@ attribute name="itemValue" required="false" %>

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<form:select path="${path}" id="${id}">
    <form:options items="${items}" itemLabel="${itemLabel}" itemValue="${itemValue}"/>
</form:select>
我使用的是一个非常旧的JSTL版本,它与JBoss4.04GA捆绑在一起,这可能是问题所在吗?我不确定EL表达式的计算是否准确,例如,标记中直接计算的${x}不会计算,它只适用于特殊标记。升级可以解决这个问题吗?如果是这样,使用自己的JSTL库而不是与JBoss捆绑的JSTL库有多难

正在使用不匹配的servlet版本(指定了2.5,但JBoss4使用了2.4),既作为依赖项,也在web.xml中使用。所以EL没有按应有的方式工作

<tags:select items="${mycollectionattribute}" id="id" path="mybean.selectvalue" itemLabel="label" itemValue="id"/>
javax.servlet.ServletException: Type [java.lang.String] is not valid for option items