title: Using Stream Result with Struts2
body: <p>I am attempting to use a Stream Result to return an image from a struts2 application. I seem to be having problem with configuring the action. Here is the configuration:</p>
  
  <pre><code>    &lt;result name="success" type="stream"&gt;
              &lt;param name="contentType"&gt;image/jpeg&lt;/param&gt;
              &lt;param name="inputName"&gt;inputStream&lt;/param&gt;
              &lt;param name="contentDisposition"&gt;filename="${filename}"&lt;/param&gt;
              &lt;param name="bufferSize"&gt;1024&lt;/param&gt;
      &lt;/result&gt;
  </code></pre>
  
  <p>The problem seem to be the inputName parameter which according to the docs is:</p>
  
  <blockquote>
    <p>the name of the InputStream property from the chained action (default = inputStream).</p>
  </blockquote>
  
  <p>I am not sure what name I should put there. The error I get is:    </p>
  
  <blockquote>
    <p>Can not find a java.io.InputStream with the name [inputStream] in the invocation stack.</p>
  </blockquote>
  
  <p>Has anyone used this before? Any advice?</p>
  
  <p>Thanks.</p>