title: What is the simplest way to map a folder on the file system to a url in Tomcat?
body: <p>Here's my problem...  I have a small prototype app (happens to be in Grails hosted on AWS) and I want to add the ability of the user to upload a few (max 10) images.  I want to persist these images on disk on the server machine, in a folder location which is outside my WAR.</p>
  
  <p>I realise that there is probably a super-scalable solution involving more web servers and optimised static asset serving, but for the approximately 100 users I am likely to get, it's really not worth the effort and cost.</p>
  
  <p>So, what is the simplest way I can have a virtual folder from my url map to a physical folder on disk?  I sort of want...</p>
  
  <pre><code>http://myapp.com/static
  </code></pre>
  
  <p>to map to a folder which I can configure e.g.</p>
  
  <pre><code>/var/www/static
  </code></pre>
  
  <p>so I can then have in my code...</p>
  
  <pre><code>&lt;img src="/static/user1/picture.jpg"/&gt;
  </code></pre>
  
  <p>I don't particularly mind whether the resulting physical folders are directly browsable.  Security will eventually be an issue, but it isn't at the start.</p>
  
  <p>So, what are my options?  I have looked at virtual hosts on the apache site, but it feels more complicated than I need.</p>
  
  <p>I don't want to use the Grails static rendering plugins.</p>