title: POST an array of strings from velocity to a struts ActionForm
body: <p>i m trying to retrive an array of String from a velocity template in a struts ActionForm:</p>
  
  <p>my Html code :</p>
  
  <pre><code> &lt;input type="checkbox" id="checkboxAFF01" value="AFF01" name="expert[1]"&gt; 
   &lt;input type="checkbox" id="checkboxAFF02" value="AFF02" name="expert[2]"&gt; 
  &lt;input type="checkbox" id="checkboxAFF03" value="AFF03" name="expert[3]"&gt;
  </code></pre>
  
  <p>my ActionForm:</p>
  
  <pre><code>private String[] expert;
  
   public String getExpert(int index) {
     return expertise[index];
   }
  
   public void setExpert(int index, String value) {
     expertise[index] = value;
   }
  </code></pre>
  
  <p>but i m getting this error:</p>
  
  <pre><code> 2013-02-11 14:53:10,284 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[MainServlet] - "Servlet.service()" pour la servlet MainServlet  exception
  java.lang.NullPointerException
   at .....setExpert(TestForm.java:115)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.commons.beanutils.PropertyUtils.setIndexedProperty(PropertyUtils.java:1435)
   at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1013)
   at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
   at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
   at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
   at com.oroad.stxx.plugin.StxxTilesRequestProcessor.processPopulate(StxxTilesRequestProcessor.java:201)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
   at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:149)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  </code></pre>