The actionservlet of struts controls the navigation flow. Other struts classes, such as action, are used to access the business logic class. When the actionservlet receives a request from the container, it uses uri (or path "path") to determine which action will be used to process the request. An action can verify the input and access the business layer to retrieve information from the database or other data services.
To verify the input or use the input to update the database, the action needs to know the value to be submitted. It does not force each action to capture these values from the request. Instead, the actionservlet binds the input to the JavaBean.
The input Bean is a subclass of the struts actionform class. By searching the Request Path, actionservlet can decide which actionform to use. Action is also selected in the same way. Actionform extends the org. Apache. Struts. Action. actionform class. Each request must be responded with an HTTP response. Generally, Struts actions do not render the response information themselves, but forward requests to other resources, such as JSP pages. Struts provides an actionforward class to save the path of a page as a logical name. After the business logic is completed, the action selects and returns
Actionforward. Servlet then uses the path saved in the actionforward object to call the page to complete the response.
Struts binds these details to an actionmapping object. Each actionmapping is relative to a specific path. When a path is requested, the servlet queries the actionmapping object. The actionmapping object tells the servlet which actions, actionform, and actionforward will be used by this request.
all these details, about action, actionform, actionforward, actionmapping, and something else, are defined in the struts-config.xml file. At startup, actionservlet reads the configuration file and creates a configuration object database. During runtime, the struts application creates a configuration object based on the file, instead of the file itself.