Struts process

xiaoxiao2021-03-06  61

Struts's ActionServlet controls the navigation stream.

Action, used to access business logic classes.

When ActionServlet receives a request from the container,

It uses the URI to determine that Action will be used to handle the request.

An action can verify the input,

Update the database for the verification input or use the input.

Action needs to know what is submitted.

Bind the input to the ActionForm by the ActionServlet.

ActionServlet can decide which ActionForm that can be used by looking for a request to use.

Action is also selected by the same method.

Struts provides an ActionForward class,

Used to store a page path as a logical name.

When the business logic is completed, the Action selection and returns an ActionForward to servlet.

Servlet then calls the page to complete the response using the path stored in the ActionForward object.

Struts binds these details in an ActionMapping object.

Each ActionMApping is relative to a specific path.

When a path is requested, the servlet queries an actionMApping object.

Actionmapping object tells servlet,

Which Actions, ActionForms, and ActionForWards will be used.

转载请注明原文地址:https://www.9cbs.com/read-88591.html

New Post(0)