Designing our fantasy controller

Let’s do another one of our now-infamous architectural diagrams to see what this controller and its support components might look like.

image with no caption

1 Having received a request, the Controller locates the correct Form Validation Component in the Declarations XML file. The Controller invokes the Form validator, sending it the request. If the validator finds any errors, it tells the controller which view to return.

2 Using the Declarations XML file, the Controller locates and invokes the Request Action Component component, which invokes the model.

3 Using the Declarations XML file, the Controller locates and invokes the View.

image with no caption

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.