Refactoring the Beer app for Struts

Enough theory, let’s write a Struts app. First off, let’s review our MVC Beer app from Chapter 3. The only code that’s going to change when we refactor to Struts is related to the MVC controller. (The model and view are not affected.)

image with no caption

1 Having received a request, the Controller performs validation of the user form data.

2 The Controller invokes the Model component.

3 The Controller forwards to the View.

MVC controller code (from Chapter 3)

image with no caption
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset