Sign in to Community
Sign in to view all badges
What is the alternative for the data-sly-use attribute in JSP. Is there any other way to call use api scripts from a .jsp file?
@PremIB As per my knowledge you need to write the whole logic into the JSP file itself and inside the scriptlet tags.
String propertyName = properties.get("propertyName", String.class);
P.S. It better to use Sightly /HTL based component over JSP based component.
What is the use case here? Please see https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/calling-custom-utility-met... if that is useful.
Ideally if you have backend implementation already as a Model try to use HTL. Keep the backend implementation logic in service components so that if you have to use jsp, it can be called within jsp.
Another way (may be not ideal) use a .html file to use the data-sly-use attribute. Use or include this HTL file within the ultimate jsp where you are looking to use the data-sly-use attribute