Answers for "How we can fetch url values in Apex class?"

0

How we can fetch url values in Apex class?

public with sharing class pageurlclass{
 
         /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
 
    public  String  headerdata{get;set;}
    public string urlvalue{get;set;}
    public string url{get;set;}
        
    public pageurlclass(){
        
         headerdata= ApexPages.currentPage().getHeaders().get('Host');
        
         urlvalue=Apexpages.currentPage().getUrl();
        
         url='https://' + headerdata+ urlvalue;
    }
  
 
}
Posted by: Guest on August-28-2020
0

How we can fetch url values in Apex class?

<apex:page controller="pageurlclass">
 
   <!-- 
        /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
         -->
      
  1.  {!headerdata}
 
  2.  {!urlvalue}
 
  3.  {!url}
 
</apex:page>
Posted by: Guest on August-28-2020

Code answers related to "How we can fetch url values in Apex class?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language