title: combo box in struts
body: <p>hi i am trying to populate a combo box in struts 1.2 but i got some exception
  here is my code</p>
  
  <p>dto</p>
  
  <pre><code>public class GroupDTO {
      public GroupDTO() {
          // TODO Auto-generated constructor stub
      }
  
      private String value;
      private String lable;
  
      public GroupDTO(String value,String lable){
          this.value = value;
          this.lable = lable;
      }
  
      public String getLable() {
          return lable;
      }
  
      public void setLable(String lable) {
          this.lable = lable;
      }
  
      public String getValue() {
          return value;
      }
  
  }
  </code></pre>
  
  <p>action class</p>
  
  <pre><code>public class DualListBoxAction extends Action {
  
  @Override
  public ActionForward execute(ActionMapping mapping, ActionForm form,
          HttpServletRequest request, HttpServletResponse response)
          throws Exception {
      // TODO Auto-generated method stub
  
      List&lt;GroupDTO&gt; groupList = new ArrayList&lt;GroupDTO&gt;();
      GroupDTO groupDTO = null;
      groupDTO = new GroupDTO("1", "group1");
      groupList.add(groupDTO);
      groupDTO = new GroupDTO("2", "group2");
      groupList.add(groupDTO);
      groupDTO = new GroupDTO("3", "group3");
      groupList.add(groupDTO);
      groupDTO = new GroupDTO("4", "group4");
      groupList.add(groupDTO);
  
      HttpSession session = request.getSession();
      session.setAttribute("groupList", groupList);
  
        return mapping.findForward("success");
  }
  
  }
  </code></pre>
  
  <p>form bean</p>
  
  <pre><code>public class DualListBoxForm extends ActionForm {
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  
  private String groupName;
  
  public String getGroupName() {
      return groupName;
  }
  
  public void setGroupName(String groupName) {
      this.groupName = groupName;
  }
  
  public static long getSerialversionuid() {
      return serialVersionUID;
  }   
  }
  </code></pre>
  
  <p>struts-config.xml</p>
  
  <pre><code>&lt;struts-config&gt;
  
  &lt;form-beans&gt;
      &lt;form-bean name="dualListBoxForm" type="com.dss.form.DualListBoxForm"/&gt;
  &lt;/form-beans&gt;   
  
  &lt;action-mappings&gt;
      &lt;action path="/dualListBox" scope="session" type="com.dss.action.DualListBoxAction" name="dualListBoxForm"&gt;
          &lt;forward name="success" path="/dualListBox.jsp" /&gt;
      &lt;/action&gt;
  &lt;/action-mappings&gt; 
  </code></pre>
  
  <p></p>
  
  <p>index.jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;jsp:forward page="dualListBox.do"&gt;&lt;/jsp:forward&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>dualListBox.jsp</p>
  
  <pre><code>    &lt;%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %&gt; 
  &lt;%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %&gt; 
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Dual List Box&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
         &lt;h1&gt;Struts: Using HTML Options Tag Example&lt;/h1&gt;
  
          Please select the menu.
  
          &lt;h1&gt;hello hello&lt;/h1&gt;
          &lt;html:form action=”dualListBox”&gt;
              &lt;html:select property=”menu” &gt;
  
                  &lt;html:option value=”"&gt;–SELECT–&lt;/html:option&gt;
  
                  &lt;html:options collection=”groupList” property=”value” labelProperty=”label” /&gt;
  
              &lt;/html:select&gt; 
  
          &lt;/html:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>error</p>
  
  <pre><code>org.apache.jasper.JasperException: /dualListBox.jsp(17,27) quote symbol expected
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
      at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:198)
      at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148)
      at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1208)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1422)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:130)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
      at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
      at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
      at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
      at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
      at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
  Feb 13, 2012 7:26:03 PM org.apache.struts.chain.commands.AbstractExceptionHandler execute
  WARNING: Unhandled exception
  </code></pre>