Hi,
I have created a HTML page with a form, and an OSGI service to save the data and send email. I want to know whether it is possible to call the OSGI service using Javascript or HTML without the component?
The HTML page that I have created does not using the CQ template or component, it is just a pure HTML file with some Javascripts.
<form id="aForm" action="">
<input type="text" class="textbox" name="contactNumber" />
....
</form>
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
instead of a service, use a servlet and call the same using javascript or html. Refer [1] for the example
[1] https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
Views
Replies
Total Likes
instead of a service, use a servlet and call the same using javascript or html. Refer [1] for the example
[1] https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
Views
Replies
Total Likes
Hi
Adding one more helpx reference for your help:-
Link:- https://helpx.adobe.com/experience-manager/using/first-osgi.html
// Once OSGI is deployed,
We can call OSGI functions from JSP like:-
Option 2:-
As mentioned by Lokesh, invoking it by Ajex request.
Link:- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
I hope this would be useful for you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi,
I have tried to use the servlet, but I got this error by the empty CSRF token. May I know how to include this token in the html?
In the example article I have found https://helpx.adobe.com/experience-manager/using/custom-sling-servlets6_1.html, it is mentioned to use the <cq:includeClientLib categories="cq.jquery" />
In my case, I did not use the template JSP. Is there a way to include this CSRF token in HTML?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies