The Struts Beer app architecture

Here’s the Beer app architecture, all done up in Struts...

image with no caption

1 Having received a request, the ActionServlet locates the correct form bean using the struts-config.xml file. The ActionServlet invokes the form bean’s validation logic. If the form bean finds any errors, it populates an ActionErrors object.

2 Using the struts-config.xml file, the ActionServlet locates and invokes the Action object, which invokes the model and returns an ActionForward object to the ActionServlet.

3 Having previously extracted the necessary mappings from struts-config.xml, the ActionServlet uses the ActionForward object to dispatch to the correct view component.

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.