title: Where to keep folder to upload images too in Java Spring framwork
body: <p>Many images are going to be uploaded by users. </p>
  
  <ol>
  <li>Where should such a folder be kept.</li>
  <li>How will I access the images in my web application.</li>
  <li>Should the folder be in webcontent/resources ?</li>
  </ol>
  
  <p>Update after looking around: </p>
  
  <ol>
  <li>Decided to create an upload folder outside the webapp
  <a href="https://stackoverflow.com/questions/7274517/java-ee-best-way-to-get-real-path-to-uploaded-files">Java EE - Best way to get real path to uploaded files?</a></li>
  <li><p>While uploading </p>
  
  <p>File file = new File("Path to external folder"+filename);</p></li>
  <li><p>To access uploaded images: created a mapping to external folder in servlet-context.xml</p>
  
  <p>&lt; mvc:resources mapping="/images/**" location="file:///D:/rahul/eclipse_java/images/"/></p></li>
  </ol>
  
  <p>Now localhost/application/images maps to D:/folder/images</p>
  
  <p>Should try using SpEL and config properties to separate out the paths to a properties file.</p>