JSP:
<%@ taglib uri="/struts-tags" prefix="s" %>
Action class:
import java.util.List;
public class TestAction {
public String execute() {
return "success";
}
public void setFoo(final List foo) {
for (final Integer item : foo) {
System.out.println(item);
}
}
}
struts.xml part:
/test.jsp
If you press the button, this will throw a big ClassCastException at: for (final Integer item : foo)