title: Uploading and saving files in JSP
body: <p>I'm trying to upload images in JSP using <a href="http://commons.apache.org/fileupload/download_fileupload.cgi" rel="nofollow">Apache Common FileUpload</a> with Spring/hibernate. Uploading of images works well.
  My project folder is located by the following path.</p>
  
  <pre><code>E:\Project\SpringHibernet\wagafashionNew\wagafashion
  </code></pre>
  
  <p>After parsing the request, I'm trying to save the uploaded image into the following folder.</p>
  
  <pre><code>E:\Project\SpringHibernet\wagafashionNew\wagafashion\web\images
  </code></pre>
  
  <p>I've tried in various ways to get this path but I couldn't succeed.</p>
  
  <p>Specifying a relative path something like the following</p>
  
  <pre><code>File f=new File("wagafashion/web/images/image_file.xxx");
  </code></pre>
  
  <p>would not work.</p>
  
  <p>Is there a way to retrieve the following path?</p>
  
  <pre><code>E:\Project\SpringHibernet\wagafashionNew\wagafashion\web\images
  </code></pre>
  
  <p>or specify a relative path with the <code>new File("relative_file_path")</code> constructor? </p>
  
  <p>Am I saving files into a wrong directory? In that case in which project folder files are to be saved?</p>