Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Related Tutorials


 
 

Share on Google+Share on Google+

Results

Advertisement
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

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 21, 2013

Related Tutorials

Discuss: Results  

Post your Comment


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