Web Server URI

If you need to retrieve the web server URI for rending images in HTML emails try this

method GetWebServerURI
   /+ Returns String +/
   Local string &strUrl, &strTabName, &strUrlModified;
   Local string &sRegex, &sReplace;
   Local JavaObject &jRegex, &jUrl;

   &strUrlModified = "";
   &strTabName = "DEFAULT";
   &strUrl = GenerateHomepagePortalURL(%Portal, %Node, &strTabName);

   /* Regex strings */
   &sRegex = "(.*)/(ps[cp])/(.*)";
   &sReplace = "$1/";

   /* Instantiate objects and replace */
   &jRegex = CreateJavaObject("java.lang.String", &sRegex);
   &jUrl = CreateJavaObject("java.lang.String", &strUrl);
   &strUrlModified = &jUrl.replaceAll(&jRegex, &sReplace);

   Return &strUrlModified;

end-method;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License