title: How to get data from JSP to Action class by id instead of property in Struts 2?
body: <p>I am doing on Java Struts 2 framework. </p>
  
  <p>Normally, I can get data from my JSP through the get set method in <code>Form.java</code> (action class). Below is my example :</p>
  
  <p>In <code>main.jsp</code> file:</p>
  
  <pre><code>&lt;html:text property="campaignName" size="50" maxlength="50" /&gt;
  </code></pre>
  
  <p>thus, I can get this text box name by get set method in the action class, the below is code from </p>
  
  <p><strong><code>mainForm.java</code> :</strong></p>
  
  <pre><code>private String campaignName = null;
  
  public String getCampaignName() {
      return campaignName;
  }
  
  public void setCampaignName(String campaignName) {
      this.campaignName = campaignName;
  } 
  </code></pre>
  
  <p>However, because of I want to use jQuery to do something, I no longer use <code>&lt;html:text&gt;</code> as text box, but I use <code>&lt;input type="text" id="datepicker" /&gt;</code>.</p>
  
  <p>Because of without property attribute inside this text box, I cant get the value from this text box. I have tried to add <code>property="something"</code> inside the text box also, but get set method in <code>mainForm.java</code> is return <code>null</code>.</p>
  
  <p>I would like to ask, how can I get the value by this text box?</p>