title: (Struts2) How to add new parameters into Action instance from an interceptor?
body: <p>I want to <strong>make an interceptor</strong> to pre-process XML request. In this interceptor, it parse the XML and put the processed info into ValueStack so that it can map to the instance in the action. However, I have tried so many methods but none of them is work. Can anyone help me and give me advises? Thanks!</p>
  <blockquote>
  <p><strong>In Interceptor</strong><br><br>
  //Get ValueStack<br>
  ActionContext ctx = invocation.getInvocationContext();<br>
  Map ctxMap = ctx.getValueStack().getContext();</p>
  <p>//Have tried the following but none of the following is work<br>
  ctxMap.get(&quot;com.opensymphony.xwork2.ActionContext.parameters&quot;)).put(&quot;data1&quot;,
  &quot;1&quot;);<br>
  ctxMap.get(&quot;parameters&quot;)).put(&quot;data1&quot;, &quot;1&quot;);<br>
  ctxMap.get(&quot;request&quot;)).put(&quot;data1&quot;, &quot;1&quot;);<br>
  ctx.getParameters().put(&quot;data1&quot;,new String[]{&quot;1&quot;});</p>
  </blockquote>
  <pre><code>//Sample Action Class
  public class TestAction extends ActionSupport {
       private String data1;
       public String execute() {  
           System.out.println(&quot;data1 value: &quot; + data1);
           return SUCCESS;
       }
  //Get Setter is omitted here
  }
  </code></pre>