liferay dxp 7.0 hook, new jsp file












0















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










share|improve this question

























  • we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

    – Olaf Kock
    Nov 13 '18 at 11:26











  • @OlafKock i update my question to give you more information, do you have any idea to this ?

    – Tarik Fakhouri
    Nov 14 '18 at 8:12











  • When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

    – Olaf Kock
    Nov 17 '18 at 21:50
















0















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










share|improve this question

























  • we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

    – Olaf Kock
    Nov 13 '18 at 11:26











  • @OlafKock i update my question to give you more information, do you have any idea to this ?

    – Tarik Fakhouri
    Nov 14 '18 at 8:12











  • When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

    – Olaf Kock
    Nov 17 '18 at 21:50














0












0








0








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










share|improve this question
















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







liferay liferay-7 liferay-hook






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 13:24







Tarik Fakhouri

















asked Nov 13 '18 at 11:08









Tarik FakhouriTarik Fakhouri

2518




2518













  • we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

    – Olaf Kock
    Nov 13 '18 at 11:26











  • @OlafKock i update my question to give you more information, do you have any idea to this ?

    – Tarik Fakhouri
    Nov 14 '18 at 8:12











  • When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

    – Olaf Kock
    Nov 17 '18 at 21:50



















  • we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

    – Olaf Kock
    Nov 13 '18 at 11:26











  • @OlafKock i update my question to give you more information, do you have any idea to this ?

    – Tarik Fakhouri
    Nov 14 '18 at 8:12











  • When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

    – Olaf Kock
    Nov 17 '18 at 21:50

















we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

– Olaf Kock
Nov 13 '18 at 11:26





we know that you want to "display", and we know "some condition". For me, this is not enough to think of an alternative solution - I don't even know what you have implemented so far. I'd recommend to describe the (business) usecase, as well as post some sample code of your existing solution. Liferay's notification system might provide a completely different solution, depending on the underlying problem that you're trying to solve.

– Olaf Kock
Nov 13 '18 at 11:26













@OlafKock i update my question to give you more information, do you have any idea to this ?

– Tarik Fakhouri
Nov 14 '18 at 8:12





@OlafKock i update my question to give you more information, do you have any idea to this ?

– Tarik Fakhouri
Nov 14 '18 at 8:12













When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

– Olaf Kock
Nov 17 '18 at 21:50





When you say "can't display my jsp": Do you mean that the redirect is sent, but your page is not shown - e.g. results in 404? Or the redirect is not sent?

– Olaf Kock
Nov 17 '18 at 21:50












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279689%2fliferay-dxp-7-0-hook-new-jsp-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279689%2fliferay-dxp-7-0-hook-new-jsp-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues