Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-24734

Struts actions returning null cannot be overridden

    Details

      Description

      Having a hook plugin, struts actions returning a null value cannot be overridden. The reason for this is a NullPointerException in the execute() -method in com.liferay.portal.struts.StrutsActionAdapter. In the current version (LR6 EE SP2, 6.0.12) the method expects the original action to return an ActionForward as seen below.

      @Override
      public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception

      { ActionForward actionForward = _action.execute(_actionMapping, _actionForm, request, response); return actionForward.getPath(); }

      An example of a struts action returning null is com.liferay.portal.action.LoginAction (/c/portal/login).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              jon.haikarainen Jon Haikarainen (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 26 weeks, 1 day ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2