These are both very nice. As to the first one, that mentions
"struts-config" at the top, I would change the top caption to read 

"The Action classes you created which are registered with the
ActionMappings loaded from the struts-config.xml".

And the second to read 

"A request for ... registered in the mappings with the path ... "

The second diagram seems to imply that the Actions are registered with
the mappings and the forms, which isn't quite correct. Some of the
mappings may reference an Action, but it is the mappings that are
registered when the application loads. (Struts keeps a list of the
Actions it creates, but that doesn't happen until they are called.)

So I would just say at the top 

"The ActionMappings and ActionForm beans are registered when your server
... "

In the square, under doPost / doGet, 

2) -- may mean to say "Locale"

4) -- might say "fill it from the request" to avoid ambiguity

Under the Explanation, I would say 

1) The ActionServlet checks the ActionMappings for a mapping whose
"path" property matches the URI ...

2) The servlet asks the mapping for its associated ActionForm class. If
there is one, the object is created and filled from the request. 

3) The servlet asks the mapping for its associated Action class, creates
or reuses the appropriate Action object, and finally passes the
ActionMapping, ActionForm, and request objects to the Action's perform
method.

I'd be tempted to add a 2.1 to mention reset() and validate() and cover
all the bases.

2.1) Before populating the ActionForm bean, the servlet calls the bean's
reset() method. After filling the bean from the reqeust, the servlet
calls the bean's validate() method. If validate returns false, the
servlet forwards the ActionForm bean to the destination given by the
mapping's input property.

Otherwise, these are great!

-Ted.

Reply via email to