How to Incorporate JavaBeans into Servlet-JSP Workflow
JavaBeans are incorporated into the servlet-JSP workflow by implementing a front controller MVC architecture, as shown earlier in Figure 16.2 Within MVC, JSP components, using JavaBeans and JSP tag libraries, generate all requests that generate user presentation. Little or no Java code is contained within JSP pages; instead, Java code is implemented within the supporting JavaBeans and/or JSP tag libraries. Within this model, JavaBeans provide non–business logic implementations that support JSP presentation. Also in this model, JavaBean implementations may request server-side services, which are processed by servlets functioning within the Controller layer. Servlets control or direct processing of all requests originating from the presentation layer; that is, access to data and forwarding of requests to business units or presentation components as needed. JavaBeans may also be incorporated into the servlet-JSP workflow by implementing logic within the Controller layer. Within this model, the business objects available to Controller layer servlets are implemented to meet JavaBean specifications in addition to their target functional implementations.
|