Foren
prevent jsp hook execution for all communities
avasek atok, geändert vor 8 Jahren.
prevent jsp hook execution for all communities
Junior Member Beiträge: 41 Beitrittsdatum: 09.01.15 Neueste Beiträge
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, geändert vor 8 Jahren.
RE: prevent jsp hook execution for all communities
Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
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, geändert vor 8 Jahren.
RE: prevent jsp hook execution for all communities
Regular Member Beiträge: 117 Beitrittsdatum: 20.01.12 Neueste Beiträge
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, geändert vor 8 Jahren.
RE: prevent jsp hook execution for all communities
Junior Member Beiträge: 41 Beitrittsdatum: 09.01.15 Neueste Beiträge
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, geändert vor 8 Jahren.
RE: prevent jsp hook execution for all communities
Regular Member Beiträge: 117 Beitrittsdatum: 20.01.12 Neueste Beiträge
Yes. Application-Adapter will only work for JSP-Hook. Kindly brief about your current requirement, as which service you want to override.