title: multi form - form tag in foreach
body: <p>In Spring MVC, I want to create multi form in same page. According to me, ıt is logically true. But it gives error as </p>
  
  <blockquote>
    <p>ERROR: org.springframework.web.servlet.tags.form.HiddenInputTag -
    Neither BindingResult nor plain target object for bean name 'cost'
    available as request attribute</p>
  </blockquote>
  
  <p>Controller</p>
  
  <pre><code>@RequestMapping(value = {  "/vehicle_cost" }, method = RequestMethod.GET)
  public String vehicleCost(Model model, @RequestParam(defaultValue="0") int vId) {
      List&lt;CostModel&gt; _costs = null;
      List&lt;CurrencyModel&gt; _currencies = accountingService.getCurrencyList();
      List&lt;IdElemModel&gt; _cost_per_types = accountingService.getCostPerTypeList();
      if(vId &gt; 0){
          _costs = operationService.getVehicleCostsByVehicleId(vId);
      }
      else{
  
      }
      model.addAttribute("costs", _costs);
      model.addAttribute("currencies",_currencies);
      model.addAttribute("cost_per_types",_cost_per_types);
      return "vehicle_management/vehicle_cost";
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code>&lt;c:forEach items="${costs}" var="cost"&gt;
                      &lt;form:form commandName="cost" method="POST"  action="save_vehicle_cost" cssClass="form-horizontal" role="form"&gt;
                      &lt;form:hidden path="costId" /&gt;
                      &lt;form:hidden path="costCategoryId" /&gt;
                      &lt;div class="form-group"&gt;
                          &lt;div class="col-lg-2"&gt;
                              &lt;form:input path="cost" cssClass="form-control" /&gt;
                          &lt;/div&gt;
                          &lt;div class="col-lg-1"&gt;
                              &lt;form:input path="taxRatio" cssClass="form-control" /&gt;
                          &lt;/div&gt;
                          &lt;div class="col-xs-2"&gt;
                              &lt;form:select path="currencyId"  cssClass="form-control"&gt;
                              &lt;option value="-1"&gt;Currency&lt;/option&gt;
                                  &lt;form:options items="${currencies}" itemLabel="currency"
                                      itemValue="currencyId" /&gt;
                                      &lt;form:options/&gt;
                              &lt;/form:select&gt;
                          &lt;/div&gt;
                          &lt;div class="col-lg-2"&gt;
                              &lt;form:select path="costPerTypeId"  cssClass="form-control"&gt;
                              &lt;option value="-1"&gt;Per Type&lt;/option&gt;
                                  &lt;form:options items="${cost_per_types}" itemLabel="elem"
                                      itemValue="id" /&gt;
                                  &lt;form:options/&gt;
                              &lt;/form:select&gt;
                          &lt;/div&gt;
                          &lt;div class="col-lg-2"&gt;
                              &lt;form:input path="periodBegin" cssClass="form-control dateInput" /&gt;
                          &lt;/div&gt;
                          &lt;div class="col-lg-2"&gt;
                              &lt;form:input path="periodEnd" cssClass="form-control dateInput" /&gt;
                          &lt;/div&gt;
                          &lt;div class="col-lg-1"&gt;&lt;button type="submit" class="btn btn-success"&gt;SAVE&lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;/form:form&gt;
                  &lt;/c:forEach&gt;
  </code></pre>