How to display “hello world” in CQ5 using osgi

Question!

I need to learn how the code flows between sling and Felix in CQ5. I am looking for a basic operation in which my jcr node /jsp will display "Hello World". BUT this message should come from an OSGi bundle.

Basically, I need to create and install the bundle too. But at least I need to know the flow of control here.

Can someone please help on this



Answers

You can also do the same thing from servlet too.This way you get a basic Idea of using Sling servlet with CQ as well.

you can call a sling sevlet bundled as OSGI bundle and deployed in CQ's system console. later you can call, this OSGI bundle fire a post request and you will be able to get the response. here is a very nice and very explanatory tutorial that explain every and each steps.

http://scottsdigitalcommunity.blogspot.in/2013/06/posting-form-data-to-adobe-cq-using.html

and the sample code or sample application link can be found from here -

http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

follow the above link step by step and you end up with the victory.



This video can help you solving your question :)
By: admin