Struts1

目前(2010-07-02)的 Struts 1 的版本是1.3.10.

一个完整的 Struts 用例的执行过程

用户提交表单到服务器,假定表单的 action="register.do",依据 web.xml 的配置,提交表单的 action 属性值是以 *.do 结尾的,于是这个请求交给 ActionServlet 处理。ActionServlet 依据配置文件的 <action-mapping> 元素,建立一个 ActionMapping 对象。如果 <action> 元素的 name 属性有值,则根据找到 <form-bean> 并依据其 type,创建一个 FormBean 对象,创建后,即根据提交的内容,使用该 FormBean 的 setters 赋值。然后具体的 Action 类,即 <action> 的 type 对应的类的 execute 方法开始执行。

其他

The ActionForm is meant to represent your data-entry form, not just the data beans.

感谢《Struts in Action》,多年就应该阅读了,至少,我晚了五年。

Reference

Official website: http://struts.apache.org/1.3.10/index.html

Struts in Action