Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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.

 

 

 

aem6.5 dynamic dropdown

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct Reply

206 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct Reply

206 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

30-03-2021

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! 

Answers (1)

Answers (1)

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