有可能实现这样的目标吗?
<c:forEach items="${someList}" var="variable">
<form:form name="myForm ${variable.value}"
action="Foo" method="POST"
modelAttribute="attribute"> // I am using model attribute from c:foreach variable
<form:input //it says error is in here
value="${attribute.name}" path="name" />
<button type="submit">Commit</button>
</form:form>
</c:forEach>
编辑:我更改了代码,因此每个表单都有不同的名称,到目前为止它都有效,但是无法从c:forEach变量获取modelAttribute。