title: struts 2 Action chain getting different values of same object
body: <p>I have an action class where I am passing value from jsp, then modifying that value in action class 1 and then due to action chain, another action2 is being called.
  In action 2 I am getting the original value</p>
  
  <p><code>value= 100// in jsp
  action 1: value*10= 1000// action 1 
  go to action 2</code></p>
  
  <p>I want modified value to go to action 2 <code>i.e. 1000//</code>value modified in action 1. but I am getting<code>10// i.e. original value.</code></p>
  
  <p>can you tell me what to do in order to use values obtained from action 1.</p>
  
  <p>struts.xml</p>
  
  <pre><code>&lt;action name="action1" class="vaannila.action.action1"&gt;
      &lt;result name="success" type="chain"&gt;action2
      &lt;/result&gt;
  &lt;/action&gt;
  &lt;action name="action2" class="vaannila.action.action2"&gt;
      &lt;result name="success" type="dispatcher"&gt;result.jsp
      &lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p>action 1</p>
  
  <pre><code>public class action1 extends ActionSupport implements SessionAware{ 
      public String execute() throws Exception{
          System.out.println("original"+ pSB.getvalue() ); // getting 10
          pSB.getvalue((pSB.getvalue()*10));
  
          System.out.println("modified"+ pSB.getvalue() ); // getting 100 
                  return "success";   
      }
  }
  </code></pre>
  
  <p>action 2: </p>
  
  <pre><code>public class action2 extends ActionSupport implements SessionAware{ 
      public String execute() throws Exception{
          System.out.println("original"+ pSB.getvalue() ); // getting 10 instead of 100.
              return "success";   
      }
  }
  </code></pre>