After action executes business logic, <result > tag is used to display the View.
Struts2 provides or supports to 11 types of Results:
Result types are configured within the <package> tag.
"type" attribute is used to configure an action that will execute a result. "name" attribute provides a unique identifier, "class" attribute provides the implementation class for the result type and "default" attribute allows changes in the default result type.
If no attribute is specified, default type "dispatcher" is used to dispatch to JSP pages.
One can custom create their own Result types and configure them in web application.
There are also other ways to render results:
Result type is linked to View. Besides the "type" attribute and default type "dispatcher" attribute, there are three other technologies that can replace JSPs in a Struts2 application:
Posted on: September 21, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles