Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Hello all,
In my AEM application, in the page properties, I have added Adobe Launch script. Called this script in the page template level(in head.html section). So, during page load time, Adobe Launch script will execute and does many things. One part is it adds some details to cookies, say "launch_cookie".
My Java logic(which I am calling from few components.) will read the launch_cookie value from cookie and uses the values. Now, during page load time Java logic executes first. Then Adobe launch script is adding the value to cookies. So, during the first page load, my java logic is not getting the proper values from cookie. How can i resolve this issue?
Adobe Launch script should execute first. Then, java logic should execute.
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
Hi
The requirment you want to achieve is not possible because Launch Script is JS which is client side script which means it needs user browser/agent to get executed. Java code where you have written some logic on these cookies is server side script and as you mentioned when page is loaded, server side script is executed first and vice versa is not possible.
If you really want to achieve some task which is dependent on these cookies, you must take your logic from java(server side) to JS(client side) keeping following in mind:
Hope it helps!
Thanks,
Nupur
Hi
The requirment you want to achieve is not possible because Launch Script is JS which is client side script which means it needs user browser/agent to get executed. Java code where you have written some logic on these cookies is server side script and as you mentioned when page is loaded, server side script is executed first and vice versa is not possible.
If you really want to achieve some task which is dependent on these cookies, you must take your logic from java(server side) to JS(client side) keeping following in mind:
Hope it helps!
Thanks,
Nupur