Fetching current page URL in dialog dynamic drop down

Avatar

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

30-03-2021

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.

 

 

 

View Entire Topic

Avatar

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
Singaiah_Chintalapudi
MVP

30-03-2021

Try with either getServletPath() or getRequestUrl()/getRequestUri(). One of these should work.

Thanks,

Singaiah