title: Is there any way to create form with multiple submit buttons on Spring MVC using annotations?
body: <p>I'm trying to create simple add/remove form using annotation based Spring MVC.
  'Add' functionality comes smoothly, but when I tried to add another button to form i've got stuck.</p>
  
  <p>Here is my code:</p>
  
  <p>Controller actions:</p>
  
  <pre><code>@RequestMapping(value = "/books/documentType.do", method = RequestMethod.GET)
  public String getDocType(
          @RequestParam(required = false, value = "id") Long id,
          ModelMap model) {
  
      DocTypeDTO docType = new DocTypeDTO();
      if (id != null)
          docType = docTypeConverter.getDTO(id);
      model.addAttribute("docType", docType);
      return "/books/documentType";
  }
  
  @RequestMapping(value = "/books/documentType.do", method = RequestMethod.POST)
  public String setDocType(
          @ModelAttribute("docType") DocTypeDTO docType,
          BindingResult result,
          SessionStatus sessionStatus
  ) {
      docTypeValidator.validate(docType, result);
      if (result.hasErrors())
          return "/books/documentType";
      else {
          docTypeConverter.saveDTO(docType);
          sessionStatus.setComplete();
          return "redirect:/books/documentTypes.do";
      }
  
  }
  </code></pre>
  
  <p>Awfully markuped form:</p>
  
  <pre><code>&lt;form:form method="post" commandName="docType" id="editForm"&gt;
  &lt;table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#dbdbdb"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;table border="0" cellspacing="0" cellpadding="0" width="100%"&gt;
                  &lt;tr&gt;
                      &lt;td class="spacer"&gt;&lt;img src="/images/spacer.gif" width="116" height="1" border="0"/&gt;&lt;/td&gt;
                      &lt;td class="spacer"&gt;&lt;img src="/images/spacer.gif" width="216" height="1" border="0"/&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="form-cell-text-underlined"&gt;Отображать на сайте&lt;/td&gt;
                      &lt;td colspan="2"&gt;
                          &lt;form:checkbox path="shownOnSite"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="form-cell-text-underlined"&gt;Международный&lt;/td&gt;
                      &lt;td colspan="2"&gt;
                          &lt;form:checkbox path="international"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="form-cell-text-underlined"&gt;Внутренний код&lt;/td&gt;
                      &lt;td colspan="2"&gt;
                          &lt;form:input path="internalCode"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="form-cell-text-underlined"&gt;Код&lt;/td&gt;
                      &lt;td colspan="2"&gt;
                          &lt;form:input path="code"/&gt;
                          &lt;form:errors path="code"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="form-cell-text-underlined"&gt;Код IATA&lt;/td&gt;
                      &lt;td colspan="2"&gt;
                          &lt;form:input path="codeIATA"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="padded-underlined"&gt;Название&lt;/td&gt;
  
                      &lt;td colspan="2"&gt;
                          &lt;form:input path="name"/&gt;
                          &lt;form:errors path="name"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td class="padded-underlined"&gt;Название(Англ.)&lt;/td&gt;
  
                      &lt;td colspan="2"&gt;
                          &lt;form:input path="nameEn"/&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
                  &lt;tr&gt;
                      &lt;td colspan="3"&gt;
                          &lt;input type="submit" value="Сохранить"&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/table&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks!</p>