Multiple choice technology programming languages

What is return type of execute () method?

  1. void

  2. String

  3. ActionForward

  4. ActionMapping

Reveal answer Fill a bubble to check yourself
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)'