title: How to pass an InputStream from a jsp to a servlet
body: <p>I have to print on a jsp page some images that i get in the form of InputStream.</p>
  
  <p>First i have servlet that passes a variable containing an InputStream to a jsp page, this way:</p>
  
  <pre><code>request.setAttribute("Image", InputStream);
  request.getRequestDispatcher(pagename).include(request, response);
  </code></pre>
  
  <p>In my jsp page i have this to get that InputStream:</p>
  
  <pre><code>${requestScope.VariableContainingInputStream}
  </code></pre>
  
  <p>To turn that InputStream into an image i should use a servlet this way:</p>
  
  <pre><code>&lt;img src="ServletName"&gt;
  </code></pre>
  
  <p>How can i pass that InputStream to that servlet?</p>