I am having a problem using expression language and struts tags together in a struts2 project. The following code snippet from a jsp file illustrates my problem. The fruits object is passed by a servlet. I know that the error is not from the servlet because when I comment out the form code, it correctly prints out each fruit.
<c:forEach var="fruit" items="${fruits}">
<c:out value="${fruit}"/>
<s:form>
<s:checkbox label="${fruit}"></s:checkbox>
</s:form>
</c:forEach>
This doesn't work, and the following error is returned: "According to TLD or attribute directive in tag file, attribute label does not accept any expressions".
What I'm wondering is, is there a way to do this in a similar elegant fashion that doesn't require expression language? I really want to use the struts tags for my jsp page. I've also tried with %{fruit} with no luck.