title: Send select multiple values through post in jsp struts
body: <p>Im building a web page in jsp where you can add, view, and delete authors, books and editorials.
  In the addBook jsp its required to select the editorial of the book and the authors who wrote it.
  The problem is in the struts action, where I try to catch the values sended through post.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  
     &lt;script&gt;
      $(document).on("ready",function(){
          $("#bAdd").on("click", function(){
              var option=$("#authorsSelect option:selected").text();
              $("#saveAuthors").append('&lt;option&gt;'+option+'&lt;/option&gt;');
              $("#authorsSelect option:selected").remove();
          });
          $("#bDel").on("click", function(){
              var option=$("#saveAuthors option:selected").text();
              $("#authorsSelect").append('&lt;option&gt;'+option+'&lt;/option&gt;');
              $("#saveAuthors option:selected").remove();
          });
      });
     &lt;/script&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;&lt;bean:message key="book.ins"/&gt;&lt;/h1&gt;
      &lt;form method="post" action="./insertBook.do?method=myAction1"&gt;
          title: &lt;input type="text" id="title" name="title" required/&gt; &lt;br/&gt;
          Year: &lt;input type="number" id="yer" name="yer" required /&gt;&lt;br/&gt;
          Editorial: 
          &lt;select  name="editorial"&gt;
              &lt;logic:iterate name="editorialsList" id="editorial" scope="request"&gt;
                  &lt;option value="&lt;bean:write name="editorial" property="id" /&gt;"&gt;
                      &lt;bean:write name="editorial" property="name"/&gt;
                  &lt;/option&gt;
              &lt;/logic:iterate&gt;
          &lt;/select&gt;&lt;br/&gt;
          price: &lt;input type="number" id="price" name="price" required /&gt;&lt;br/&gt;
          Select one or more authors:&lt;br/&gt;
          &lt;select multiple id="authorsSelect" class="comboMultiple"&gt;
              &lt;logic:iterate name="authorsList" id="autor" scope="request"&gt;
                  &lt;option value="&lt;bean:write name="autor" property="id" /&gt;"&gt;
                      &lt;bean:write name="autor" property="name"/&gt; &lt;bean:write name="autor" property="lName"/&gt;
                  &lt;/option&gt;
              &lt;/logic:iterate&gt;
          &lt;/select&gt;
          &lt;section id="botons" class="botons"&gt;
              &lt;input type="button" id="bAdd" value="&gt;&gt;"&gt;
              &lt;input type="button" id="bDel" value="&lt;&lt;"&gt;
          &lt;/section&gt;
          &lt;select multiple="multiple"  name="authorsSelect"&gt;
              &lt;option&gt; &lt;/option&gt;
          &lt;/select&gt;
          &lt;input type="submit" value="insert"&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>
  
  <p>And this is where I retrive the information
      public class InsertBookAction extends DispatchAction {</p>
  
  <pre><code>public ActionForward myAction1(ActionMapping mapping, ActionForm form,
          HttpServletRequest request, HttpServletResponse response)
          throws Exception {
      String title = (String)request.getParameter("title");
      int year = Integer.parseInt(request.getParameter("year"));
      String editorial = (String)request.getParameter("editorial");
      int price = Integer.parseInt(request.getParameter("price"));
      String[] authors = request.getParameterValues("authorsSelect");
      for(int i=0;i&lt;autores.length;i++){
          JOptionPane.showMessageDialog(null,authors[i]);
      }
      return mapping.findForward(SUCCESS);
  }
  }
  </code></pre>
  
  <p>In the line
        String[] authors = request.getParameterValues("authorsSelect");
  Im getting a null value, can someone give me a hint at what im doing wrong please</p>