title: Error displaying image in jsp
body: <p>I know there are some relevant questions, but none of them covers my subject.</p>
  
  <p>So, I have a web application using jsp, java, postgresl and apache tomcat 7.0.27.0 embedded inside NetBeans (as a plugin) and in the web directory of the project I have an 116.jpg image</p>
  
  <p>When I m displaying this image like that : <code>&lt; img src='116.jpg' alt='title' /&gt;</code></p>
  
  <p>It is being displayed correctly. Now, I want to display an image that I just uploaded and it went to a directory where it is relative to that as this : One directory up, then folder 'data' and finally folder 'img'. So,  technically, <code>&lt; img src='../data/img/117.jpg' alt='title' /&gt;</code>  This, however, is not being displayed. Moreover...</p>
  
  <p>I want to do it automatically . In here <code>&lt;%= sUploadFName %&gt;</code> I have the name of the image that is being uploaded by the user (e.g. 865.jpg ).</p>
  
  <p>So, I would want something like that in order to work:
  <code>&lt; img src='../data/img"&lt;%= sUploadFName %&gt;"' alt='title' /&gt;</code> and the image should appear normally.</p>
  
  <p>Can anyone explain me what am I doing wrong? Thanks in advance.</p>