title: Save image to java project path using multipart
body: <p>Trying to save image in project path directly. Image is directly uploading from UI which is build on Angularjs. I want to save the image to a folder, in the project in eclipse but it is throwing exception. I am using MutipartFile interface of spring framework</p>
  
  <p>Project Structure</p>
  
  <pre><code>web
  |
   src
     |
      main
         |
          webapp
               |
                app
                  |
                   images
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>@RequestMapping(path = "/attachmentPath", method = RequestMethod.POST)
      public Response attachmentPath(Attachment attachment , @RequestParam(value = "file") MultipartFile file) throws IllegalStateException, IOException {
  String orgName = file.getOriginalFilename();
  String filePath = "/images/"+orgName;
          File dest = new File(filePath);
          try { file.transferTo(dest); }
          catch (IllegalStateException e) 
          { e.printStackTrace();}
  </code></pre>
  
  <p>Exception</p>
  
  <pre><code>java.io.FileNotFoundException: img\images\users\TestCopy1.jpg (The system cannot find the path specified)
  </code></pre>