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

Compare the local model diagram to this remote model diagram

The shaded area in this diagram should look a LOT like the previous diagram, especially if you remember that the Business Delegate is pretending to be the Manage Customer model.

image with no caption

A 6-step review:

1 Register your services with JNDI.

2 Use Busines 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 another stub. Return this stub’s reference to the controller.

4 Add the Customer stub reference to the request.

5 The controller forwards to the View JSP. The JSP gets a reference to the Customer bean (stub) from the request object.

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

BIG NOTE: Every time the JSP invokes a getter, the Customer stub makes a network call.

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