O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Business tier patterns: quick review

To wrap up our discussion of business tier patterns, here’s a diagram that shows a Business Delegate, a Service Locator, and a Transfer Object in action. At the end of the chapter you’ll find a couple of summary pages for these patterns and the presentation tier patterns we’ll discuss next.

image with no caption

A 6-step review:

1 Register your services with JNDI.

2 Use Business Delegate and Service Locator to get the Manage Customer stub from JNDI.

3 Use the Business Delegate and the stub to get the “Customer Bean”, which in this case is a Transfer Object. Return this Transfer Object’s reference to the controller.

4 Add the bean’s reference to the request.

5 The controller forwards to the View JSP. The JSP gets the reference to the Customer Transfer Object bean from the request object.

6 The View JSP uses EL to get the Customer Transfer Object Bean’s properties it needs to satisfy the original request.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required