Calling OOTB portlet struts actions

Many a time it is required to call OOTB portlet struts action from custom portlets.This can be done using the simple approach as follows.

 

public class TestPortlet extends MVCPortlet{
 
 @Override
 public void processAction(ActionRequest actionRequest,
 ActionResponse actionResponse)
 throws IOException, PortletException {
 
    try {
       
        PortletActionInvoker.processAction(
         "com.liferay.portlet.documentlibrary.action.EditFolderAction",                               getPortletConfig(),
          actionRequest, actionResponse);
 
     }
     catch(Exception e) {
 
        e.printStackTrace();
     }
}
 
}