在struts框架的web程序中,http请求服务器,struts执行的全过程

来源:百度知道 编辑:UC知道 时间:2024/05/10 17:50:43
个人用过一段时间的struts,服务器用的是tomcat,但是对它的执行原理并不熟悉,只知道大概一些。
请baidu上的高手指点一下
我给50分,如果说的好,我可以再加分。
我的意思是问struts在http请求到服务器的时候,struts具体的执行过程,比如说调用了actionservlet的方法,然后,去执行action。

A client requests a path that matches the Action URI pattern (1).
 The container passes the request to the ActionServlet.
 If this is a modular application, the ActionServlet selects the appropriate
module.
 The ActionServlet looks up the mapping for the path.
 If the mapping specifies a form bean, the ActionServlet sees if there is one
already or creates one (1.1).
 If a form bean is in play, the ActionServlet resets and populates it from the
HTTP request.
 If the mapping has the validate property set to true, it calls validate on
the form bean (1.2).
 If it fails, the servlet forwards to the path specified by the input property
and this control flow ends.
 If the mapping specifies an Action type, it is reused if it already exists or
instantiated (1.3).
 The Action’s perform or execute method is called and passed the instantiated
form bean (or null).
 The Action may populate the form bean