Development of MVC system steps by using Struts framework for Java EE Foundation

Source: Internet
Author: User
Tags define config html form
J2ee

Because struts has provided us with a very good MVC framework, we can use struts to develop an MVC system that greatly speeds up development. One development process that can be used at development time is as follows:

1. Collect and define application requirements.

2. Define and develop "screen display" requirements based on the principles of data acquisition and display.

3. Define access paths for each "screen display".

4. Define the connection between the Actionmappings and the application business logic.

5. Develop all the support objects that meet the "screen display" requirements.

6. Create the corresponding Actionform object based on the data properties provided by each "screen display" requirement

7. Develop the action object called by Actionmapping.

8. Develop and apply business logic objects (BEAN,EJB, etc.).

9. The corresponding actionmapping design process creates the JSP page.

10. Establish the appropriate configuration file Struts-config.xml, Web.xml.

11. Development/testing/deployment

In particular, when using the struts framework, the development of the corresponding sections mainly includes:

1. Model section: Using JavaBean and EJB components to design and implement the business logic of the system. Derives a specific action object from the action based on different requests. Complete the "Do what" task to invoke the business component that is composed of the bean. Create an encapsulation of client form data by Actionform derived classes.

2. Controller section: Struts provides us with the core control part of the implementation. We only need to configure the Actionmapping object

3. View section: In order to use the Actionform object in model, we must create an HTML form with a custom tag provided by struts. Use the custom tag library provided by struts to write the user interface to separate the application logic from the display logic. The Struts framework establishes the connection between view and model through these custom tags. Struts's custom tags also provide a number of custom page features.

4. At the same time, you need to edit two profiles: Web.xml and Struts-config.xml. They configure the interaction between each module in the struts system.



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.