title: Getter and Setter - POJO object - Problem with input data in Struts2
body: <p>I have a problem with setter and getter method in struts2.
  I have a form :
  
     
     
  ...
  +   all input fields of job/></p>
  
  <p>and action: (addJob is mapped at this action)
  public class InsertJobAction extends ActionSupport{
  ...
     private Job job = null;
     public String execute(){
        jobService.insert(job); //here job is not null; that is ok
     }</p>
  
  <ul>
  <li>getter and setter for job
  }</li>
  </ul>
  
  <p>this action works correctly;</p>
  
  <p>I have a similar form and action, but the input fields from thisform are less than first form;
  The problem is here: in execute() of the second action job is null. Why??
  Does depend it of fields noumber ??
  I have 2 constructors in my Job class one with no params, and one with all params for every field of class;</p>
  
  <p>I made debug with Log4j ...and in first case there arrives in Job constructor in the second not. Why??When it calls constructor???</p>
  
  <p>When are called the setter and getter methodsb, before or after execute() method??? And when i have a form with input data?? Are called setter methods before execute() method?</p>
  
  <p>I'm very confusely because in a case it works without problems, but in the second case it doesn't</p>
  
  <p>Thanks,
  Andrew</p>