Simple process:
When publishing struts Web Services. initialize actionservlet and actioncontext in XML format. after receiving an httprequest request, actionservlet uploads the request parameters to the corresponding formbean Based on the configuration content in the struts-config.xml and sets the session (formbean is not used in development ). then, based on the action parameter in the request, find the specified action in the struts-config.xml and call this action to process the request. according to the processing result of the action, a forward variable is returned. findforward () finds the action or JSP page identified by the corresponding forward (not transferred to another action during development) and forwards the request to the next processing. if forward points to the JSP page, it is output to the foreground.
Example:
If you want to log on to a website built by STRUTS technology, you need to enter the user name and password, and then click log on. The process is as follows:
(1) The actionservlet receives the request sent by the user (the actionservlet has been initialized );
(2) After receiving the request, the actionservlet transmits the request parameters to the corresponding formbean according to the configuration content in the struts-config.xml.
(3) locate the specified action in the struts-config.xml based on the action parameter in the request and call this action to process the request
(4) According to the action processing result, a forward variable is returned. findforward () finds the action or JSP and forwards the request to the next processing. if forward points to the JSP page, it is output to the foreground.
Note: The action in struts is single-instance, so there is a thread security problem. For more information about the struts process, see actionservlet and requestprocessor.