Struts ships with standard result types such as Dispatcher and Stream. This chapter explains how you can write a custom result type. An example, a CAPTCHA image producing result type, is also discussed.
A result type must implement the com.opensymphony.xwork2.Result interface. This interface has one method, execute, whose signature is as follows.
void execute(ActionInvocation invocation)
This method gets called when the result is executed. A result type author can write the code that will be run when an instance of the result type executes.
ActionInvocation was explained in Chapter 18, “Custom Interceptors.”
The org.apache.struts2.dispatcher.StrutsResultSupport class is a base class ...