| With the rapid development of network technology and the wide use of J2EE platform, the multilayer web structure based on B/S has developed gradually, and becomes the mainstream of the web application development. Even though the most advanced software platform J2EE is adopted in the web application development, there are still some difficulties existed. In the design of the multilayer web structure, it has ubiquitous defects, for example, the application to be reused is low, the maintenance is heavy and the adaptability of the software is weak. So how to organize program to write, upgrade, maintain and extend easily and effectively, is one of the focuses of present Internet technical development.The Model-View-Controller pattern discards disadvantages that the design pattern in traditional web application has. It separates the control of the data and the view of the data so as to meet the demand of the more and more complicated multi-layer web application. So MVC pattern is the best choice to develop the J2EE web application. Apache struts framework based on the J2EE platform, is a typical framework to implement the Model-View-Controller (MVC) design pattern. Model is made up of JavaBean or EJB that implements the business logic. Controller is constituted by Action Servlet and Action. A group of JSP files constitutes the view. The framework lightens the burden to construct the multi-layer web application and provides reused components.In this thesis, to make a deep study and research of J2EE and the MVC pattern is firstly introduced. Based on this study, the struts framework and its basic principle are expatiated, focusing on how to use struts framework and optimize the Web development framework to resolve the questions that exist in the present Web development.For the above purpose, the research and the design are following: a thorough research on the idea of the MVC design pattern to analyze the advantages and disadvantages of this pattern and its applicability scope, a detail analysis of the structure of the struts framework that implements the MVC design pattern, that is, on the basis of the struts framework, the analysis and the contrast of the implementation of the multilayer web structure are made to summarize the technical implement scheme of the five layers B/S framework, and then to design a reasonable web development framework based on Struts. To improve the efficiency and the validity of programming, the thesis also makes a discussion on the code builder. At the end of the thesis, the way of realizing the system by an instance is illustrated to validate its feasibility. |