In the first article, we use http://127.0.0.1:8080/hello address access to our most simple Struts application, here is to understand its code execution process, in order to better understand the Struts

I. Flow chart

We know that filters are created when you first start up, and the system does a lot of things when you create filters. Based on the execution process in the first chapter, we will analyze the execution process of Struts as shown in the figure below

2. Proper noun analysis

1. Filter: A filter is a filter between resource files on the client and server. Before accessing resource files, a series of filters are used to modify and judge the requests and intercept or modify the requests that do not meet the rules. After filtering conditions are configured in web.xml, when we request an action, the request will be filtered by Struts, and then the response will be made according to different request information.

2. Dom4j: After reading the action requested by the user, a series of processes are followed to read the configuration file and perform the response. Dom4j is an open source framework for parsing XML files. In other application scenarios, dom4J can also be used to parse XML files when writing application configuration information to XML

3. Reflection calls: In computer science, reflection refers to a class of applications that are self-describing and self-controlling. In Java programming, reflection is a powerful tool. Reflection allows us to write and execute our program code with access to the internal information of the classes loaded into the JVM, rather than the code collaborating with selected classes in the source code. Struts happens to use reflection.