java action to get current url

0
hello i need create a java action to get all ulr including paramters. i do this on nanoflow using javascript and window.location.href. In java how i can to do the same thinght?
asked
2 answers
0

You won’t be able to get the current URL of a page using Java unless it’s being called from a Request Handler. 

This is because microflows are usually called from the client, so you will get the URL used to request the microflow, not the application.

answered
0

Hey Pedro,

in my case one simple line of code did the job:
return window.location.pathname;
 

I used it in a Java Script Action.
Hope this helps you!

answered