Home Struts Struts2.3.15.1 Action in Struts 2 Framework
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Action in Struts 2 Framework

Advertisement
Actions are the core basic unit of work in Struts 2 framework. Each action provides the processing logic for a specific URL with which it is linked. Actions are mostly associated with a HTTP request of User.

Actions

Actions are the core basic unit of work in Struts2 framework. Each action provides the processing logic for a specific URL with which it is linked. Actions are mostly associated with a HTTP request of User.

The action class contains business logic, retrieve resource bundle, hold the data, validation, and select the view result page that should send back to the user

action class transfer data from request to the View. It also determines which result should render the view.

class MyAction
{
public void String execute() throws Exception { return "success"; }
}

action class does not extend another class and nor it implements any interfaces.

"execute" method returns a String result code, which actions configuration matches with a specific result that will be rendered to the user.


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

Ask Questions?    Discuss: Action in Struts 2 Framework  

Post your Comment


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