Multiple choice technology web technology

To pass HttpServletRequest instance to Action, which of the following interfaces/Classes need to be implemented.

  1. ServletRequestAware

  2. ServletResponseAware

  3. ActionSupport

  4. All of them

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To receive the HttpServletRequest instance in a Struts 2 Action class, you implement the ServletRequestAware interface. This interface's setServletRequest(HttpServletRequest) method is called by Struts 2 before the action executes, injecting the request object. ServletResponseAware is for responses, ActionSupport is a convenience base class.