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

Match Request VS Content URL in AEM-6.4

Avatar

Avatar
Validate 10
Level 2
sunitac70336244
Level 2

Likes

7 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
sunitac70336244
Level 2

Likes

7 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sunitac70336244
Level 2

03-07-2019

Dear All,

I have below requirement in my AEM-6.4

Step-1

Extract plan id from cookie/session/http header (I want to write a dummy request for now For example I should get PlanId value as 197881 from cookie/session/http header)

Step-2

I want to Extract plan id from my content path URL (My dummy content path is /content/VignetteContent , as shown below.)

1784124_pastedImage_5.png

Step-3

If plan ID match (request vs content URL) then Continue Otherwise Reject.

Can anybody let me know how can I do this one in AEM-6.4?

Thanks

Sunita

View Entire Topic

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,260 likes

Total Posts

3,139 posts

Correct Reply

886 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,260 likes

Total Posts

3,139 posts

Correct Reply

886 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

08-07-2019

I am not sure what is your requirement but you can try with setAttribute if possible 

filter code

request.setAttribute("planID","197881");

request.setAttribute("locationId","1234");

request.getRequestDispatcher("/servletpath").forward(request, response);

servlet code

String planId = request.getAttribute("planID");

String locationId = request.getAttribute("locationId");

Otherwise

You can add Query String in the url like below

response.sendRedirect("servletPath?planId="+planId+"&locationId="+locationId);

String planid = request.getParameter("planId");

String locationId = request.getParameter("locationId");