title: binding paramters in struts2 without the form
body: <p>HI:
  When using a form,the parameter form the clien can be bound to an object,for example:</p>
  
  <p><a href="http://struts.apache.org/2.2.1/docs/processing-forms.html" rel="nofollow">processing-forms.html</a></p>
  
  <p>In the client:</p>
  
  <pre><code>&lt;s:form action="register"&gt;
  
        &lt;s:textfield name="personBean.firstName" label="First name" /&gt;
        &lt;s:textfield  name="personBean.lastName" label="Last name" /&gt;
        &lt;s:textfield name="personBean.email"  label ="Email"/&gt;  
        &lt;s:textfield name="personBean.age"  label="Age"  /&gt;
  
        &lt;s:submit/&gt;
  
  &lt;/s:form&gt;
  </code></pre>
  
  <p>In the severside:</p>
  
  <pre><code>public class Register extends ActionSupport {
  
      private static final long serialVersionUID = 1L;
  
      private Person personBean;
          //................
  }
  </code></pre>
  
  <p>Then the parameter of the client are bound to the personBean instance.</p>
  
  <p>Now,my problem is how to bind the parameters without a from?</p>
  
  <p>My action work as a service which will be called in the javascript,so how to bind them?</p>
  
  <p>I know how to get the parameters:</p>
  
  <pre><code>Map(String,Object) map=ActionContext.getContext.getParameters();
  String firstName= map.get("firstname")[0];
  </code></pre>
  
  <p>//..........</p>
  
  <p>This is too ugly :(</p>
  
  <hr>
  
  <p><strong><code>UPDATE</code></strong></p>
  
  <pre><code>public class ParaWrapper(){
    private String firstName;
    public void setFirstName(String ..){
      this.firstName=...
    }
    //the getter of firstName
    public ....
  }
  
  
  public MyAction extends ActionSupport{
    private ParaWrapper wrapper;
    public void setXXX()...
    public void getXXX()...
    public void execute(){
      System.out.println(wrapper); //here I can not get the parameters,it seems that the parameters are not poputed to this object.
    }
  }
  </code></pre>
  
  <p>Since I do not use the s:form tag,so How do struts know where to put the paramters ?</p>