Can we invoke a servlet from sling model ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
From sling mode, its recommended call sling services instead of sling servlet. Could please give more detail on your scenario?. Thanks.
Hi,
From sling mode, its recommended call sling services instead of sling servlet. Could please give more detail on your scenario?. Thanks.
@rgravisankar there is no scenario in which i want to use it, but, I just want to know whether it is possible to access a servlet from sling model or not.
Hi @rgravisankar,
IMHO, as @rgravisankar says, it's not a good practice to call a servlet from a model. Using services makes more sense. To get answer, please read similar thread here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/call-a-servlet-get-request...
Hope that helps!
Regards,
Santosh