title: Display Image using <img> tag and JSP scriptlet?
body: <p>I am trying to display the image on <strong>JSP</strong> page using Following code </p>
  
  <pre><code>&lt;% String url;
          url=config.getServletContext().getRealPath("/images/1.jpg"); %&gt;
          &lt;img src= &lt;%=url%&gt;/&gt;
  </code></pre>
  
  <p>I also try to give double-quot but it does not work can anyone tell me can i give absolute path to the image file like this or i have to use the <strong>streams</strong> for it ?</p>
  
  <p>And which is the best way to store images and uploaded file relative path or absolute path or into the database ?</p>