When a JSP page is requested, the corresponding FormBean is automatically created and the struts tag control is set by the corresponding attribute. Therefore, if you want to set the initial values for the controls on the page from the very beginning, set the corresponding attributes in the FormBean constructor.
When a JSP page is requested, ActionBean is not automatically generated.
The attribute is not actually a data member of the Bean. It actually corresponds to the set/get method of the Bean.
EG:
<Html: text property = "teacherID" name = "AdminAddTeacherForm"/>
When necessary, the Controller calls the setTeacherID Method Based on the content in the text box, or calls getTeacherID to obtain the content setting text box. No matter whether your BEAN has the data member teacherID or not. Of course, we should not randomly set the name of the data member.
Completing...
Note: 1-property
1-The control is used to calling the tag-generated controls. It is estimated that most people in the Microsoft style are used to this.