Connect to us ( @twitter | @facebook )
There are two ways to get the servlet request object inside struts 2 action class’s execute method. ServletActionContext : Directly accessing the getRequest method from the ServletActionContext class will return the request object. ServletRequestAware : If you implement the action class with ServletRequestAware interface, then struts controller will send the request object through setServletRequest method. […]