我需要在struts 1.x中获取jsp格式的表单bean值
我尝试遵循代码,但没有帮助。
<c:forEach begin="1" end='here I need that from bean value' var="i" >
<c:choose>
<c:when test="${param.pageNumberInput eq i}">
<td>
<c:out value="${i}" />
</td>
</c:when>
<c:otherwise>
<td>
<a href="#"><c:out value="${i}" /> </a>
</td>
</c:otherwise>
</c:choose>
</c:forEach>
我可以使用以下标记获取表单bean值
但我这样试着却不管用
<c:forEach begin="1" end='<bean:write name="formBeanName" property="propertyName" />' var="i" >
<c:choose>
<c:when test="${param.pageNumberInput eq i}">
<td>
<c:out value="${i}" />
</td>
</c:when>
<c:otherwise>
<td>
<a href="#"><c:out value="${i}" /></a>
</td>
</c:otherwise>
</c:choose>
</c:forEach>
请帮助如何获取此formBean
属性值。
1条答案
按热度按时间lymnna711#
您不能在另一个JSP标记的属性中使用JavaServer Pages(JSP)标记。访问bean的属性只需要JSP表达式语言(EL)。