【正文】
ssing all HTTP claim which send out Struts of entrance point. Its interception with distribute these claim to arrive correspond of action type.(these action all of type is Action son type)Moreover the control module is also responsible for using to correspond of claim the parameter fill Action Form(FromBean), and pass action type(ActionBean).Action type the business logic of the interview core, then interview Java Bean or adjust to use EJB. End action type control the power pass followup of JSP document, from JSP document born see diagram. All these control logic make use of the document e to allocation. See diagram in the Struts frame main from JSP born page pletion, the Struts provide abundant of JSP label database, this is advantageous to separating performance logic and procedure model is with 1 or the form existence of several Java Bean. In the Struts, main existence three kinds of Bean, respectively BE: Action, ActionForm, EJB perhaps Java Bean. The Struts frame have no concrete definition model layer of realization, in actually the development, model layer usually is close with business logic connect with each other, and want to carry on operation to the first floor data. The underneath39。t particularly a web framework but a generic lightweight application framework with dedicated web support, and show the architectural differences to Struts and WebWork In contrast to Struts or WebWork, Spring is an application framework for all layers: It offers a bean configuration foundation, AOP support, JDBC abstraction framework, abstract transaction support etc. It is a very nonintrusive effort: Your application classes do not need to depend on any Spring classes if not necessary, and you can reuse every part on its own if you like to. From its very design, the framework encourages clean separation of tiers, most importantly web tier and business logic. : the validation framework does not depend on web controllers. Major goals are reusability and testability: Unnecessary container or framework dependencies can be considered avoidable evils. Of course, Spring39。s general patterns. Nevertheless, replacing the web solution with Struts, WebWork, or the like is easy. Both with Spring39。t generally aim to pete with existing solutions. It rather fosters seamless integration with standards like Servlet, JSP, JTA, JNDI, JDBC, and JDO, and wellsuited tools like Hibernate, Velocity, Log4J, and Caucho39。s JtaTransactionManager if you need distributed transactions but only then, as there are perfect replacements for single databases, like DataSourceTransactionManager or HibernateTransactionManager. Spring39。t have a form, you don39。s no need to implement an interface or derive from a base class. Spring39。t need to duplicate your business objects39。s often preferable to bind directly to your business objects. This is another major difference to Struts which is built around required base classes like Action and ActionForm for every type of action. Compared to WebWork, Spring has more differentiated object roles: It supports the notion of a Controller, an optional mand or form object, and a model that gets passed to the view. The model will normally include the mand or form object but also arbitrary reference data. Instead, a WebWork Action bines all those roles into one single object. WebWork does allow you to use existing business objects as part of your form, but just by making them bean properties of the respective Action class. Finally, the same Action instance that handles the request gets used for evaluation and form population in the view. Thus, reference data needs to be modelled as bean properties of the Action too. Regarding views: Spring39。t want to use Spring39。s respective helper method) from within a Struts or WebWork action. Note that there aren39。ll simply use Spring as a library, with the root application context instance as entry point. All your registered beans and all of Spring39。s web MVC. Spring doesn39。t, from bean configuration to data access and transaction handling. So you are able to enrich your application with a Spring middle tier and/or data access tier, even if you just want to use . the transaction abstraction with JDBC or Hibernate. If just focussing on the web support, some of Spring39。t very good, can pass JNDI will it modification is usage Tomcat of conjunction pond.