Foros de discusión
prevent jsp hook execution for all communities
avasek atok, modificado hace 8 años.
prevent jsp hook execution for all communities
Junior Member Mensajes: 41 Fecha de incorporación: 9/01/15 Mensajes recientes
Hi, I have multiple communities in a single liferay instance. I have create a jsp-hook to override one of the core liferay portal jsp.
Out of 5 community sites which i have, this hook is needed by only one community. Hence I want to prevent the execution of this jsp hook for other communities. For event based hooks i can prevent based on the community url, since this is a jsp hook i haven't written any java classes.
Hence looking for any suggestions to overcome this.
Thanks,
Out of 5 community sites which i have, this hook is needed by only one community. Hence I want to prevent the execution of this jsp hook for other communities. For event based hooks i can prevent based on the community url, since this is a jsp hook i haven't written any java classes.
Hence looking for any suggestions to overcome this.
Thanks,
Olaf Kock, modificado hace 8 años.
RE: prevent jsp hook execution for all communities
Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
You can make a JSP hook an "application adapter", where it will only be active in those communities (or rather sites, I hope you're in the latest version because I can't remember when they were introduced). You'll do this by setting the custom-jsp-global flag to false. Caveat: Each site can only have one application adapter.
Also, some issues to be careful about here and here.
Also, some issues to be careful about here and here.
Punam Shah, modificado hace 8 años.
RE: prevent jsp hook execution for all communities
Regular Member Mensajes: 117 Fecha de incorporación: 20/01/12 Mensajes recientes
Well, simple convert global hook to adapter hook ; by updating property <custom-jsp-global>false</custom-jsp-global> in liferay-hook.xml.
Please refer : https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/lp-6-1-dgen06-customizing-sites-and-site-templates-with-application-adapt-0 for more information.
Please refer : https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/lp-6-1-dgen06-customizing-sites-and-site-templates-with-application-adapt-0 for more information.
avasek atok, modificado hace 8 años.
RE: prevent jsp hook execution for all communities
Junior Member Mensajes: 41 Fecha de incorporación: 9/01/15 Mensajes recientes
Thanks Kock and Shah. Would the same setting works for service hook, post login, auto login hooks or is there a separate mechanism.
I tried with the same setting for service hook, but in vain.
Please suggest.
I tried with the same setting for service hook, but in vain.
Please suggest.
Punam Shah, modificado hace 8 años.
RE: prevent jsp hook execution for all communities
Regular Member Mensajes: 117 Fecha de incorporación: 20/01/12 Mensajes recientes
Yes. Application-Adapter will only work for JSP-Hook. Kindly brief about your current requirement, as which service you want to override.