title: MismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException
body: <blockquote>
    <p>controller</p>
  </blockquote>
  
  <pre><code>///////////////////////////////////////////////////////////////////////// get
  ///////////////////////////////////////////////////////////////////////// employee
  ///////////////////////////////////////////////////////////////////////// no to
  ///////////////////////////////////////////////////////////////////////// update
  @RequestMapping(value = "/editemp/{id}")
  public String edit(@PathVariable int id, Model model) {
      model.addAttribute("employee", emloyeeService.findEmpById(id));
      return "empedit";
  }
  </code></pre>
  
  <blockquote>
    <p>above code to edit employee data by id and it's working
    this is url <a href="http://localhost:9090/springwebjdbctemplate/editemp/2" rel="nofollow noreferrer">http://localhost:9090/springwebjdbctemplate/editemp/2</a></p>
  </blockquote>
  
  <pre><code>@RequestMapping(path = "/getallemp", method = RequestMethod.POST)
  public String edit(@Valid Employee employee, BindingResult bindingResult) {
      if (bindingResult.getErrorCount() &gt; 0) {
          return "empedit";
      } else {
          emloyeeService.updateEmpData(employee);
          return "redirect:/allemp";
      }
  </code></pre>
  
  <blockquote>
    <p>exception occurs here when i try to store modified data and redirect the request to "allEmp.jsp" page 
    this is url <a href="http://localhost:9090/springwebjdbctemplate/editemp/getallemp" rel="nofollow noreferrer">http://localhost:9090/springwebjdbctemplate/editemp/getallemp</a> 
    i think the problem in url it should be <a href="http://localhost:9090/springwebjdbctemplate/getallemp" rel="nofollow noreferrer">http://localhost:9090/springwebjdbctemplate/getallemp</a> instead of above url</p>
  </blockquote>