The question was also asked here
https://answers.atlassian.com/questions/104859/how-can-i-receive-current-url-from-a-plugin-in-confluence
For JIRA sometimes (from Custom Field, Tabs, ect) you can use:
public static String getBaseUrl() { HttpServletRequest req = JiraWebUtils.getHttpRequest(); return req.getScheme().concat("://").concat(req.getServerName()).concat(":").concat(Integer.toString(req.getServerPort())).concat(req.getContextPath()); }
you can get using javascript
var pathname = window.location.pathname;
check this
http://stackoverflow.com/questions/406192/how-to-get-the-current-url-in-javascript
Where? In a user macro? In a macro or plugin? In JavaScript on the page?
With Javasacript l can only problem is will this work when for example l want the content as PDF because l need to use the current displayed URL in a condition in a user macro
It looks like you're new here. Sign in or register to get started.