How to get the current page path in a sling servlet that is called in the component dialog?
Hi,
I have a component that can be dragged and dropped onto a parsys in a page. The component dialog has a dropdown that gets the options from a servlet.
In the servlet, I want to access the currentPage path. i.e the page where the component was added.
I have tried to access it in the servlet using request.getRequestURI() and request.getResource().getPath() etc. But it points to the servlet path.
Can anyone let me know how I can the current page path in the servlet?
Thanks in Advance.
Regards,
Chaitanya Pai