Struts2 result result type

After Action processes the request, it returns a string (logical view name). Struts2 decides which result to respond to according to the logical view name. It is necessary to provide an <result>element definition result page in struts.xml.

<result>Label properties:

  • The name matches the return value of the method in the action and jumps.
  • Type role: is used to define the jump method. Values ​​that type can take:
    • chain: It is equivalent to request forwarding. It is generally used to jump from one action to another.
    • dispatcher: It represents request forwarding and is also the default value. It is generally used to jump from action to page.
    • redirect: It represents a redirect and it is generally used to jump from action to page.
    • redirectAction: It represents redirection and is generally used to jump from action to another action.
    • stream: It means that the server returns a stream, which is generally used for downloading.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325390119&siteId=291194637