title: How to pass textfield data from ajax action in Struts 2 to original calling .jsp?
body: <p>I'm not sure if that title is phrased correctly. Let me explain what I'm trying to do:</p>
  
  <p>I have a file <strong>new.jsp</strong> with a form </p>
  
  <pre><code>&lt;s:form id="newdep" name="newdep" theme="simple" action="submitForm" &gt;
  </code></pre>
  
  <p>In this form is a select box:</p>
  
  <pre><code>&lt;s:select list="apps" name="app" onchange="javascript:show_details();return false;" /&gt;
  </code></pre>
  
  <p>I'm using Dojo for ajax, and it's calling: </p>
  
  <pre><code>function show_details() {
      dojo.event.topic.publish("show_detail");
  }
  </code></pre>
  
  <p>Also within this form I have :</p>
  
  <pre><code>&lt;s:url id="d_url" action="showComp" /&gt; 
  &lt;sx:div id="details" href="%{d_url}" listenTopics="show_detail" formId="newdep" showLoadingText=""/&gt;
  </code></pre>
  
  <p>This calls <code>comp.jsp</code> on the fly with action <code>showComp</code>.</p>
  
  <p>It display a number of textfields depending on the selection made in the "app" select box. </p>
  
  <p>More specifically, once an app is selected, a hashmap <code>lstList</code> is created specific to that app (within <code>CompAction</code> - the action class for <code>showComp</code>) and displayed like so:</p>
  
  <pre><code>&lt;s:iterator value="lstList"&gt;   
    &lt;s:property value="key" /&gt;   
    &amp;nbsp;&amp;nbsp;&amp;nbsp;
    &lt;s:textfield name="value" value=""/&gt; &lt;!-- LINE I'M ASKING ABOUT --&gt;
    &lt;s:iterator value="value"&gt;     
      &lt;br&gt; 
    &lt;/s:iterator&gt; 
  </code></pre>
  
  <p>I've highlighted the textfield line because I don't think that's right. Basically, what I want to do is:</p>
  
  <ol>
  <li>Have the user select an app from the drop down. (done)</li>
  <li><code>comp.jsp</code> is called and displays relevant label from hashmap + text field for each. (done)</li>
  <li>User's entries into textfields are saved into hashmap when user clicks submit button (<strong>doesn't work</strong>)</li>
  </ol>
  
  <p>I should mention at this point that after clicking submit the user is sent to <code>results.jsp</code>. </p>
  
  <p>From this page I can easily access the data from the larger action class, <code>FormAction</code>. But I do not know how to access data (such as the hashmap) from <code>CompAction</code> (once again, the action class for the ajax action).</p>
  
  <p>So, 4. Access hashmap data from results.jsp (<strong>also doesn't work</strong>)</p>
  
  <p>My natural instinct was to use </p>
  
  <pre><code>&lt;s:property value="%{lstList}" /&gt; 
  </code></pre>
  
  <p>in <code>results.jsp</code> but no luck. I'm pretty new to struts but I'm trying my best to get a good feel for it. Any advice?</p>