Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Web application server > Struts - Pg. 117

JSF manages designated model data objects by handling their initialization, persistence over the request cycle, and cleanup. Validation and error feedback JSF allows direct binding of reusable validators to UI components. The framework also provides a queue mechanism to simplify error and message feedback to the application user. These messages can be associated with specific UI components. Internationalization JSF provides tools for internationalizing Web applications, supporting number, currency, time, and date formatting, and externalizing of UI strings. JSF is particularly well-suited to implement the MVC architectural pattern. Specifically, the JSF framework maps to the pattern as follows: Model Managed beans make up the model of a JSF application. These Java beans typically interface with reusable business logic components or external systems, such as a mainframe or database. View JSPs make up the view of a JSF Web application. These JSPs are created by combining model data with predefined and custom-made UI components. Controller The FacesServlet, which drives navigation and object management, makes up most of a JSF application's controller. Event listeners also contribute to the controller logic. Note that unlike other frameworks supporting the MVC pattern, JavaServer Faces are a standard component of the J2EE 1.4 specification. Therefore, it has received wide support from IBM and other leading vendors. 6.3.4 Struts Struts is a Servlet-JSP framework offered by the Apache Software Foundation. Struts supports application architectures based on the Model II approach, which is an implementation of the traditional MVC paradigm discussed earlier. Struts addresses a number of common design and implementation issues associated with most servlet projects: Mapping HTTP parameters to JavaBeans Standard input validation Standard error display Chapter 6. Technology options 117