title: Servlet in Eclipse - Where to put static content
body: <p>When writing a servlet with Eclipse, where am I to put my static content (images, CSS, etc.), so that I can make my HTML link to it (e.g. <code>&lt;img src="http://localhost:8080/context/image.png&gt;</code>). I have tried putting it into the WebContent directory, but that didn't work (or I didn't know how to link to it, I tried <code>&lt;img src="image.png"&gt;</code> and also <code>&lt;img src="http://localhost:8080/context/image.png"&gt;</code>).</p>
  
  <p>I attached an image of my Project Explorer, so you can maybe sort it in. 
  <img src="https://i.stack.imgur.com/zqz2d.png" alt="http://i.imgur.com/CwtCQVO.png"></p>
  
  <hr>
  
  <p>To make it easier to find, here is everything I posted in comments or elsewhere:</p>
  
  <ul>
  <li>The project's web.xml: <a href="http://pastebin.com/sTg4ugyw" rel="nofollow noreferrer">http://pastebin.com/sTg4ugyw</a></li>
  <li>My Servlet code: <a href="http://pastebin.com/az97bZAY" rel="nofollow noreferrer">http://pastebin.com/az97bZAY</a></li>
  <li>One of my HTML templates: http:pastebin.com/6KALf0Bw</li>
  </ul>