title: how to get image stored from tomcat server and display it
body: <p>I have a User form wherein users are allowed to upload images..I store those images in tomcat server and the image name in database to retrieve a particular user's image.</p>
  
  <p>My code for storing image is as follows..</p>
  
  <pre><code>String filePath = getServlet().getServletContext().getRealPath("/") +"Images";
  File folder = new File(filePath);
  if(!folder.exists()){
   folder.mkdir();
   }
   String fileName = userForm.getUploadedFile().getFileName();
   System.out.println("Server path:" +filePath);
  File newFile = new File(filePath, fileName);
                                                FileOutputStream fos = new FileOutputStream(newFile);
   fos.write(userForm.getUploadedFile().getFileData());
  fos.flush();
  fos.close();
  </code></pre>
  
  <p>now I want to display the stored image in profile page of user after login..</p>
  
  <p>I did something like this in profile page..</p>
  
  <pre><code>&lt;img src="http://localhost:8082/Images/${sessionUser.image}"/&gt; 
  </code></pre>
  
  <p>But my image is not getting displayed..</p>
  
  <p>Please someone guide..</p>