Forum Discussion
Hi phani
I believe that the URL fragment is not sent to the server so I am afraid that would not be possible. You can access it via javascript inside a custom component if that helps.
Thanks,
Hi PaoloT,
Thanks for your quick response.
We are able to get the value by using http.client.response FreeMarker context object, if the parameter passed with '&'
E.X.: /plugins/custom/community_name/community_name/your_endpoint?data=test&token=1234
Code Snippet: <#assign token = http.request.parameters.name.get("token","")/>
In our requirement we are calling the endpoint with hash value. For us Javascript is not preferable option.
E.X.: /plugins/custom/community_name/community_name/your_endpoint#token=1234
Could you please provide more description on your statement "URL fragment is not sent to the server", it might helpful for us to try some workaround?
Regards,
Phani
- VarunGrazitti10 years agoBossphani - As the freemarker executes on the server and not on the client side, so you cannot get the # fragments because they never reach server. They stay on the client side, so you could only read it using a client side language. JS or jQuery.
I hope this helps.- PaoloT10 years agoLithium Alumni (Retired)
Hi phani
these parameters that you are able to read are HTTP request parameters and that's the reason why you can read them (because they are part of the request sent to the server so it can read it). On the contrary, a fragment is not an HTTP request parameter so it's not sent in the request.
Hope this helps,
Related Content
- 4 years ago
- 13 years agoInactive User
- 5 years ago