【正文】
s unique features are: .Clear separation of roles: controller vs validator vs mand object vs form object vs model object, DispatcherServlet vs handler mapping vs view resolver, etc. .Powerful and straightforward configuration of both framework and application classes as JavaBeans, including easy inbetween referencing via an application context, . from web controllers to business objects and validators. .Adaptability, nonintrusiveness: Use whatever Controller subclass you need (plain, mand, form, wizard, multi action, or a custom one) for a given scenario instead of deriving from Action/ActionForm for everything. .Reusable business code, no need for duplication: You can use existing business objects as mand or form objects instead of mirroring them in special ActionForm subclasses. .Customizable binding and validation: type mismatches as applicationlevel validation errors that keep the offending value, localized date and number binding, etc instead of Stringonly form objects with manual parsing and conversion to business objects. Customizable handler mapping, customizable view resolution: flexible model transfer via name/value Map, handler mapping and view resolution strategies from simple to sophisticated instead of one single way. With in the J2 the EE the application very widespread customer register process for example, elucidation abovementioned system structure is how concrete usage. The process of register is very clear: Customer from register page importation register information, system to register the information carry on verification, if exactitude success register, otherwise hint correspond mistake information. In the development process, the usage Eclipse be used as development environment and added to carry to provide to the Struts and the Hibernate in the meantime better control and support of three square plugin MyEclipse, Web server usage Tomcat, the database chose to use Mysql. Carry on an allocation to the Hibernate first, need to the system auto the born . xml carry on modification, allocation good database conjunction of various parameter and definition the data reflect to shoot a document. Because the Hibernate take of conjunction pond main used for test, the function isn39。t pete with Struts or WebWork in this usage, it just addresses the many areas that the pure web frameworks don39。s services can be at your fingertips even without Spring39。t any plugins involved, therefore no dedicated integration: From the view of the web layer, you39。s web MVC but intend to leverage other solutions that Spring offers, you can integrate the web framework of your choice with Spring easily. Simply start up a Spring root application context via its ContextLoaderListener, and access it via its ServletContext attribute (or Spring39。s view resolution is extremely flexible. A Controller implementation can even write a view directly to the response, returning null as ModelAndView. In the normal case, a ModelAndView instance consists of a view name and a model Map, containing bean names and corresponding objects (like a mand or form, reference data, etc). View name resolution is highly configurable, either via bean names, via a properties file, or via your own ViewResolver implementation. The abstract model Map allows for plete abstraction of the view technology, without any hassle: Be it JSP, Velocity, or anything else every renderer can be integrated directly. The model Map simply gets transformed into an appropriate format, like JSP request attributes or a Velocity template model. If you don39。 properties as Strings in your form objects, just to be able to handle invalid submissions, or to convert the Strings properly. Instead, it39。s data binding is highly flexible, . it treats type mismatches as validation errors that can be evaluated by the application, not as system errors. So you don39。t need a FormController. This is a major difference to Struts. You can take any object as mand or form object: There39。s web framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, and locale and theme resolution. The default handler is a very simple Controller interface, just offering a ModelAndView handleRequest(request,response) method. This can already be used for application controllers, but you will prefer the included