Hello,
I am working on aem 6.5
My requirement is to get current page URL in the dynamic drop down servlet.
Currently when I fetch request.getPath it is giving me location of the component in apps folder and not the page where component is added.
So I am trying to get /content/abc/home/jrc:content and fetch page propedties there. Since m not aware of the page location this is creating problem to do further work. Anyone faced similar problem? Kindly guide me.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Kiranchonkar
Can you check the referrer header in the request object and see what it returns?
final String referrer = request.getHeader(HttpHeaders.REFERER);
Thanks!
Hi @Kiranchonkar
Can you check the referrer header in the request object and see what it returns?
final String referrer = request.getHeader(HttpHeaders.REFERER);
Thanks!
Try with either getServletPath() or getRequestUrl()/getRequestUri(). One of these should work.
Thanks,
Singaiah
Views
Likes
Replies