Do you need the full URL, or just the domain name of the current site?
If it’s just domain name, then we use a Java Action called from a microflow to get this.
IContext ctx = getContext();
IMxRuntimeRequest request = ctx.getRuntimeRequest().get();
HttpServletRequest servletRequest = request.getHttpServletRequest();
java.net.URL aURL = new java.net.URL(servletRequest.getRequestURL().toString());
As I said, It won’t get you the full URL as it will always return the /xas request to the microflow, but you can get the domain name.
If you need the port number as well in the URL, then change the last line to getAuthority instead of getHost.
Hope this helps.
It’s a bit in the dark why you need the current URL and what you want to do with this value. But could you add a dataview with a nanoflow as datasource, to return the URL as David describes?