Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Result Types |

Apache Struts 2 Documentation
Result Types
Edit Page Browse Space Add Page Add News
Added by casey, last edited by Don Brown on Dec 29, 2006 (view change)

Most use cases can be divided into two phases. First, we need to change or query the application's state, and then we need to present an updated view of the application. The Action class manages the application's state, and the Result Type manages the view.

## Predefined Result Types

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)
S2PLUGINS:Tiles Result | Used to provide Tiles integration

### Optional

JasperReports Plugin | Used for JasperReports Tutorial integration | Optional, third-party plugin

Additional Result Types can be created and plugged into an application by implementing the `com.opensymphony.xwork.Result` interface. Custom Result Types might include generating an email or JMS message, generating images, and so forth.

## Registering Result Types

All Result Types are plugged in via the Result Configuration.

## Next: DispatcherListener

Children Show Children Hide Children
XSL Result (Apache Struts 2 Documentation)
Dispatcher Result (Apache Struts 2 Documentation)
FreeMarker Result (Apache Struts 2 Documentation)
Velocity Result (Apache Struts 2 Documentation)
Redirect Result (Apache Struts 2 Documentation)
PlainText Result (Apache Struts 2 Documentation)
HttpHeader Result (Apache Struts 2 Documentation)
Redirect Action Result (Apache Struts 2 Documentation)
Chain Result (Apache Struts 2 Documentation)
Stream Result (Apache Struts 2 Documentation)