Beispiel #1
0
 // Strip off everything unneeded
 private String getBaseUrl(String pUrl, String pServletPath) {
   String sUrl;
   try {
     URL url = new URL(pUrl);
     String host = getIpIfPossible(url.getHost());
     sUrl = new URL(url.getProtocol(), host, url.getPort(), pServletPath).toExternalForm();
   } catch (MalformedURLException exp) {
     sUrl = plainReplacement(pUrl, pServletPath);
   }
   return sUrl;
 }
 String getRequestHost() {
   return reqURL.getHost();
 }