title: display image in JSP using Spring
body: <p>I'm trying to display an image in jsp injected.
  I upload and I store the image in the database, but do not know how retrieve and display in jsp.
  My controller:</p>
  
  <pre><code>@RequestMapping(value = "/ver2", method = RequestMethod.GET)
  public void ver2(HttpSession session, HttpServletResponse response) {
      OutputStream oImage;
      Item item10 = itemRepository.findOne(11);
  
      try {
          byte[] photo = item10.getImagen();
          response.setContentType("image/jpeg, image/jpg, image/png, image/gif");
          oImage = response.getOutputStream();
          oImage.write(photo);
          oImage.flush();
          oImage.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>With this code, i show a full screen, and i need inject in jsp. Any idea?</p>
  
  <p>Thanks</p>