Which of the following methods is overridden by Action class?

Options
- execute()
- service()
- run()
- destroy()


CORRECT ANSWER : execute()

Discussion Board
execute()

Execute method is overridden by the Action class. As this class in the struts application extends Struts 'org.apache.struts.action.Action" Class. Action class provides a wrapper around the business logic and provides an interface to the application's Model layer. It is a method that provides a gel between the View and Model layer. It also transfers the data from the view layer to the specific business process layer and finally returns the processed data from business layer to the view layer.
Execute() is called in the end when necessary after the instance gets created. To use the Action, we need to Subclass and overwrite the execute() method.

Rohit Sharma 10-5-2014 04:53 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement