How to Understand struts?

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.