Introduction of Struts 2 Result types
In the Apache Struts 2 framework after executing the Action class , the target view page will be executed based on configuration in struts.xml. The result type is used to change the behaviour of view page to render the contents of action class.
The framework provides several implementations of the com.opensymphony.xwork2.Result interface, ready to use in your own applications.
Chain Result | Used for Action Chaining |
Dispatcher Result | Used for web resource integration, including JSP integration |
FreeMarker Result | Used for FreeMarker integration |
HttpHeader Result | Used to control special HTTP behaviors |
Redirect Result | Used to redirect to another URL (web resource) |
Redirect Action Result | Used to redirect to another action mapping |
Stream Result | Used to stream an InputStream back to the browser (usually for file downloads) |
Velocity Result | Used for Velocity integration |
XSL Result | Used for XML/XSLT integration |
PlainText Result | Used to display the raw content of a particular page (i.e jsp, HTML) |
Tiles Result | Used to provide Tiles integration |
In Struts 2 the