title: Tomcat 7 - Secure a folder under webapps folder
body: <p>My web application is 'myweb', within this web app my code refers '123.pdf' under 'files' folder like http://<code>localhost</code>:8080/files/123.pdf  </p>
  
  <pre><code>   webapps  
     |  
     |--myweb  
     |  
     |--files  
         |  
         |--123.pdf  
  </code></pre>
  
  <p>I want the resource (123.pdf) available only for logged in users, when I try to access directly by pasting (http://<code>localhost</code>:8080/files/123.pdf) in the browser address bar, without logging into the portal, I could access the file. </p>
  
  <p>Basically I want to secure the 'files' folder under 'webapps', so that only authenticated users in portal could access resources under 'files' folder. How can I achieve this?</p>