Struts medium Core class: Actionservlet , the most important of these operations is Requestprocessor in the class Process method.
Struts Implement MVC The following is a detailed picture of:
- 1, One start, according to web.xml Span style= "font-family: the song Body;" > load actionservlet read Span style= "FONT-FAMILY:CALIBRI;" >struts struts-config The configuration in
- 2, according to url struts-config path path, get actionmapping 1.2processpath , 1.3processmapping
- 3, according to actionmapping name name lookup actionform 1.4processactionform method)
- 4, instantiation actionform map actionform assignment. Before assigning a value, first execute the reset method. ( 1.5processpopulate method) after assigning values, Then according to the third-party component beanutils Convert the string in the form to the type you want.
- 5. Create an Action instance and place it in the Map . (1.6processActionCreate method)
- 6. Let the Action Instance process the request and return a actionforward instance ( 1.7processActionPerform method).
- actionforward 1.8processforwardconfig method)