Hi
I'm using a macro where i need to have Current URL.
How to get hte current URL in the velocity file. It would be good if get it with out usign javacript/jquery.
Using $req.getRequetURI will provide the current URL with out any query String parameters.
If we need query String parameters too, we have to use $req.getQueryString() method to written the query string too.
So using $req.getRequestURI and $req.getQueryString() will give us the current URL.
Alternatively,We can also get the current URL using the javascript methods.
Hi @UdayK I can't get URI in .vm file. How can i include or define class for $req?
It looks like you're new here. Sign in or register to get started.