public static void processEvent(
      HttpServletRequest request,
      HttpServletResponse response,
      Portlet portlet,
      Layout layout,
      Event event)
      throws PortletContainerException {

    PortletContainer portletContainer = getPortletContainer();

    List<Event> events = portletContainer.processEvent(request, response, portlet, layout, event);

    if (!events.isEmpty()) {
      _processEvents(request, response, events);
    }
  }
  public static void processAction(
      HttpServletRequest request, HttpServletResponse response, Portlet portlet)
      throws PortletContainerException {

    PortletContainer portletContainer = getPortletContainer();

    ActionResult actionResult = portletContainer.processAction(request, response, portlet);

    List<Event> events = actionResult.getEvents();

    if (!events.isEmpty()) {
      _processEvents(request, response, events);
    }

    String location = actionResult.getLocation();

    if (Validator.isNotNull(location)) {
      try {
        response.sendRedirect(location);
      } catch (IOException ioe) {
        throw new PortletContainerException(ioe);
      }
    }
  }