ActionServlet class
It is the core of the STRUCTS application. It is the primary control component that handles client requests to determine which Action class handles each received request.
ActionServlet class, essence is a simple servlet, and httpservlets are similar, which inherits from the HTTPSERVLET class, and also implements the HTTPSERVLET's lifecycle, init, doget, dopost, destroy.
All specified behaviors originate from the Process () method of the ActionServlet class, which handles all requests.
After the ActionServlet receives the request, follow the steps below:
1) Dopost or doget receives the request and calls the Process method.
2) Process method gets current RequestProcessor, then calls its Process method.
3) The requestProcessor.Process () method is where all requests get true processing. This method finds the
4) If the Process method finds a matching
5) Process () method Learn to create or get an ActionForm buffer instance after the FormBean is completely named, named by the type property of the
6) After filling the data, the Process method calls the ActionForm's Validate method to verify the submitted value.
7) At this time, the Process method can start processing the request. It achieves a complete Action class name from the type attribute of
8) The Action class returns from Processing, the execute method returns an ActionForward object, which is used to determine the target of this transaction. The Process method continues to control and requests will also be forwarded to the determined target.
9) Here, the ActionServlet instance completes the process it handles the request, and is ready to serve future requests.