title: Struts 2 result, both stream and some values?
body: <p>I have a JQuery - Struts 2 application. I send a request by $.load() to struts action and I get a HTML content and every thing is fine. 
  the problem is when I need to get the HTML content <strong>along with</strong> an integer that shows the status, <strong>by a single</strong> XMLHTTPRequest.</p>
  
  <p>Actually, in my case, the HTML content is the new logs of the server process and the integer value is the status of that process.</p>
  
  <p>How to send back the integer along with the content?</p>
  
  <p>this is action config:</p>
  
  <pre><code>&lt;action name="getProcessUpdate" class="ProcessAction" &gt;
      &lt;result type="stream"&gt;
          &lt;param name="contentType"&gt;text/html&lt;/param&gt;
          &lt;param name="inputName"&gt;newLogs&lt;/param&gt;
      &lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>this is in the action class:</p>
  
  <pre><code>public class ProcessAction extends ActionSupport {
  
      private InputStream newLogStream;
  
      public InputStream getNewLogs() {
          return newLogStream;
      }
  
      public String execute() {
  
          newLogStream = new ByteArrayInputStream(getNewLogHTML().getBytes());
  
          return SUCCESS;
      }
  
      private String getNewLogHTML(){
          String newLong = "";
  
          newLong = "Some new Longs";
  
          return newLong;
      }
  }
  </code></pre>
  
  <p>And this is my jquery call:</p>
  
  <pre><code>function getNewLogs(){
      $( "#log" ).load('getProcessUpdate');
  }
  </code></pre>