liferay dxp 7.0 hook, new jsp file

194 views Asked by At

have a problem with my liferay DXP, on 6.2 i have a hook that can display after a login if some condition occurred,now i want do the same with my hook on DXP.

on 6.2 have this tree : my-hook -> main -> webapp -> custom_jsps -> folder1 -> folder2 -> some jsps and in liferay-hook : i have <struts-action-path> and <struts-action-path-imp>

on DXP i can use event login.events.post, it's fired but can't display my jsp.

and i goolged without any progress. please could someone help me on this ?

Edit : here my class action :

    public class CustomerMultipleCtsAction extends Action  {

        private String final URL_LIST_CLIENT="/html/specificClient/list/listClient.jsp";

        @Override
            public void run(HttpServletRequest request, HttpServletResponse response)
                    throws ActionException {
        // check if has multiple client : 
                 HttpSession session = request.getSession(false);
                 boolean yes = checkclient(session );
                 if(yes){
                      response.sendRedirect(URL_LIST_CLIENT);
                 }
//.....
        }
        }

and my liferay-hook :

<hook>
    <portal-properties>portal.properties</portal-properties>
         <language-properties>
            i18n/messages*.properties
        </language-properties>
     <custom-jsp-dir>/custom_jsps</custom-jsp-dir>

<struts-action>
<struts-action-path>/portal/updateClient</struts-action-path>
<struts-action-impl>com.fr.total.uap.liferay.lubrifiant.hooks.userigg.UpdateClientAction</struts-action-impl>
</struts-action>
</hook>

and here it's my action after a user choose some client :

public class UpdateClientAction extends BaseStrutsAction {
    private static final Log LOGGER = LogFactoryUtil
            .getLog(UpdateClientAction.class);



    @Override
    public String execute(HttpServletRequest request,
            HttpServletResponse response) {
        String pathTo="/";
        try {
            // update client .....
            .....
            //
            String currentURL =(String)request.getSession().getAttribute("currentURL");
            // Redirect to the choosen group
            pathTo=portalURL.concat(currentURL);
            response.sendRedirect(pathTo);
        } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);
        }
        return pathTo;
    }

hope you have all information you need thanks

0

There are 0 answers