基本 struts1 问题:Struts 1 中的 ActionForm 数据来自哪里?

Basic struts1 question: Where is the ActionForm data coming from in Struts 1?

我正在维护一个 struts 1 应用程序,需要找到将 ActionForm 对象传递给 Action class 的代码点(或了解如何传递),这是第一个我所知道的代码的入口点,但显然还有另一个入口点,其中数据被组装到 ActionForm 对象中,因为 Action class 入口点方法签名是这样的:

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, 

有人知道吗?

请求处理器,org.apache.struts.action.RequestProcessor

具体方法取决于确切的Struts版本,例如,在Struts 1.2中是process方法,在Struts 1.3中是processActionCreate方法。

自定义请求处理器是 Struts 1 中的一个 well-known 扩展点;可能值得您花时间进行一些网络搜索,因为这方面的内容已经很好地涵盖了,但同样,它是特定于版本的。

此外,请求处理器通常由不同的扩展点(例如,Tiles 和 Workflow)以不同的方式使用,这推动了 Struts 1.3 (ComposableRequestProcessor) 中的一些变化。