| In recent years,with the rapid development of network and extensive adoption of J2EE platform, multi-layer Web structure based on B/S grows up gradually. MVC design pattern separates control of data from representation of data, and therefore has the advantage of implementation of multi-layer Web applications. Struts is the application framework which implements MVC Based on J2EE platform. It eases the burden of constructing multi-layer Web applications and provides reusable software architecture.Struts configure its application using configuration-file based on XML. In the procedure of developing Struts application,Struts's configuration-file is modified frequently.If test is needed after modification,you must reset web container,which is troubled and footle.In Struts,View is made up of JSP and Custom Tag Libraries, However, as an excellent technology for creating views, JSP have some drawbacks. In this way,the existing framework is not provided with good presentation layer flexibility.The paper makes several contributions to the problem mentioned above. First, by analyzing Struts architecture, we propose a scheme for automatically reloading Struts configuration-file without resetting the WEB container to solve the first problem. Second, by making use of template technique, we present an simple and reasonable approach to improve the View of Struts, which extends the Struts presentation layer, enables efficiently separating business logic from representation logic and ameliorates the performance of business separation in the business developing process, thus fixes the second problem.Finally, we show how to integrate our schema of expanded Struts into a typical Web application---online cloth store, and present the details of design to prove the feasibility of our scheme. |