Results

After action executes business logic, tag is used to display the View. Struts2 provides or supports to 11 types of Results. Result type is linked to View.


Results

After action executes business logic, <result > tag is used to display the View.

Struts2 provides or supports to 11 types of Results:

  1. FreeMarker
  2. dispatcher
  3. redirect action
  4. Velocity
  5. chaining
  6. Result
  7. Redirect Result
  8. Redirect Action Result
  9. Stream Result
  10. XSL Result
  11. PlainText Result

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:

  1. Velocity Templates
  2. Freemarker Templates
  3. XSLT Transformations

Advertisements

Ads

 

We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.

Share on Google+Share on Google+

Results

Posted on: September 21, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: Results  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads