Views
Replies
Total Likes
Hi @Preeti5
It is always advisable is to use relative path instead of absolute path so that sling will look for the resources first under /apps(helpful in case of overlay)and then under /libs .
Detailed description you will find here : https://aemmastery.com/aem-osgi-service-dive-resource-resolver-factory-c2521f75be51
Thanks
Dipti
Hi @Preeti5
It is always advisable is to use relative path instead of absolute path so that sling will look for the resources first under /apps(helpful in case of overlay)and then under /libs .
Detailed description you will find here : https://aemmastery.com/aem-osgi-service-dive-resource-resolver-factory-c2521f75be51
Thanks
Dipti
Heya @Dipti_Chauhan
Thankyou
Hi @Preeti5 ,
Lets understand the resource resolution concept, by default the sling looks for any script under '/apps' and then '/libs' (of course if you have not modified "Apache Sling Resource Resolver Factory").
Now when you specify resource path, that can be
1. Absolute path - means you will specify either /apps* or /libs* path
2. Relative path - you do not append anything (/apps or /libs) and let Sling do its job
Now, why it is recommended to use relative path, just consider you have used /libs* and in future someone in your team creates an overlay (means modified script version under /apps*) then you have to modified all references where you have put script path as /libs.
Hope it clarifies!
More-
https://aemmastery.com/aem-osgi-service-dive-resource-resolver-factory-c2521f75be51
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies