Visualforce page:
<apex:page controller="Path">
<apex:form >
<apex:pageBlock >
Current URL is {!currURL}
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class:
public with sharing class Path {
public String currURL {get;set;}
public Path() {
currURL = ApexPages.currentPage().getUrl();
}
}
Output:
No comments:
Post a Comment