This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
public class comboboxTag extends ActionSupport
{
private List fruits;
public String execute()throws Exception{
fruits = new ArrayList();
fruits.add("Apple");
fruits.add("Mango");
fruits.add("Orange");
fruits.add("Pine Apple");
return SUCCESS;
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: tag 'combobox', field 'list', name 'fruitsNames': You must specify a collection/array/map/enumeration/iterator. Example: people or people.{name} - [unknown location]
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
root cause
tag 'combobox', field 'list', name 'fruitsNames': You must specify a collection/array/map/enumeration/iterator. Example: people or people.{name} - [unknown location]
org.apache.struts2.components.Component.fieldError(Component.java:230)
org.apache.struts2.components.Component.findValue(Component.java:351)
org.apache.struts2.components.ComboBox.findListValue(ComboBox.java:156)
org.apache.struts2.components.ComboBox.evaluateExtraParams(ComboBox.java:115)
org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)
org.apache.struts2.components.UIBean.end(UIBean.java:510)
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
org.apache.jsp.masterdata.comboboxTag_jsp._jspx_meth_s_005fcombobox_005f1(comboboxTag_jsp.java:203)
org.apache.jsp.masterdata.comboboxTag_jsp._jspx_meth_s_005fform_005f0(comboboxTag_jsp.java:137)
org.apache.jsp.masterdata.comboboxTag_jsp._jspService(comboboxTag_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
Please UseCodeTags--without them it's much harder to read code and configs.
15 days? That's amazing. I think I would have asked sooner.
You're providing a "name" for the combobox. S2 is trying to use that value to pre-populate the combobox. Your action doesn't have a fruitNames property, so it throws an exception. Create a fruitNames property.