title: Best Location for Uploading file
body: <p>Working on some import process where i need to first upload the file at some location on server and than later on i need to pick the file from this location to import it in to the system.
  i am just wondering what might be the best place to store the uploaded file. i have few option</p>
  
  <p>1) Can create a folder in the root of tomcat and than can place the upload files there and later on can pick the file for the import process.</p>
  
  <pre><code>File dir = new File(System.getProperty("catalina.base"), "uploads");
  </code></pre>
  
  <p>is this a good option and weather the above code will work equally in all enviornment</p>
  
  <p>2) i can create an uploads folder undermy application and can access it for file upload and later on for import by using the following code</p>
  
  <pre><code>ServletActionContext.getServletContext().getRealPath("uploads");
  </code></pre>
  
  <p>your valuable suggestions are needed the only work i need to do is to upload the file and den run the import process for the uploaded files(s) and once import is successfull remove files from this folder to other like processed etc.</p>