What is return type of execute () method?
-
void
-
String
-
ActionForward
-
ActionMapping
C
Correct answer
Explanation
In Struts 1.x, the execute() method in Action class returns ActionForward, which represents the destination to which the controller should forward the request. This object contains the path information and can be configured to perform a redirect instead of a forward. The method signature is 'public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)'