docs: private String convertRelativeURIToURL(String relativeURI)
      {
  
          if (relativeURI == null)
          {
              throw new IllegalStateException();
          }
          else
          {
              relativeURI = relativeURI.trim();
          }
  
          // If the passed URI contains "://" before the query string then it is either an
          // absolute URL or invalid and cannot be converted anyway
          int indexOfSchemeDelimiter = relativeURI.indexOf("://");
          if (indexOfSchemeDelimiter != -1)
          {
              int indexOfQueryString = relativeURI.indexOf('?');
  
              // If "://" occurs after '?' then it's part of the query string.
              // Otherwise return this absolute (or invalid) URL
              if ((indexOfQueryString == -1) || (indexOfSchemeDelimiter < indexOfQueryString))
              {
                  return relativeURI;
              }
          }
  
          String urlScheme = _request.getScheme();		
          if (com.ibm.ws.webcontainer.osgi.WebContainer.getServletContainerSpecLevel() >= 31) {
              if (relativeURI.startsWith("//")) {
                  StringBuffer url = new StringBuffer(urlScheme);
                  url.append(":"); // slash slash will be added from the relativeURI
                  url.append(relativeURI);
                  return url.toString();
              }
          }
  
          String webAppRootURI = null;
          boolean relativeToRootURI = false;
          try
          {
              webAppRootURI = getWebApp().getContextPath().trim();
              if (webAppRootURI.startsWith("/") == false)
              {
                  webAppRootURI = ("/" + webAppRootURI);
              }
          }
          catch (Exception ex)
          {
              com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(ex, "com.ibm.ws.webcontainer.webapp.WebAppDispatcherResponse.convertRelativeURIToURL", "184", this);
              webAppRootURI = "/";
          }
  
          try
          {
              relativeToRootURI = relativeURI.startsWith("/");
  
              // If relative URI begins with "./" (current level in URL hierarchy) then remove it
              if (relativeURI.startsWith("./"))
                  relativeURI = relativeURI.substring(2);
  
              IExtendedRequest request = _request;
  
              // 112000 - begin - there was no reason to have two schemes for handling relative to root vs.
              // not relative to root so redid the section below
  
              // add the server info to the front of the url
              int urlPort = request.getServerPort();
  
              StringBuffer url = new StringBuffer(urlScheme);
              url.append("://");
              url.append(request.getServerName());
  
              // Add the port to the URL if it is not the default one for the scheme
              if (((urlScheme.equals("http") == true) && (urlPort != 80)) || ((urlScheme.equals("https") == true) && (urlPort != 443)))
              {
                  url.append(":");
                  url.append(urlPort);
              }
  
              String redirectURL = null;
              if (relativeToRootURI)
              {
                  // 115010 - begin
                  // if the relative URI begins with '/' and we're in sendRedirect compatibility mode, then make uri 
                  // relative to the context root...otherwise, make it relative to the server (no context root)
                  if (com.ibm.ws.webcontainer.util.WebContainerSystemProps.getSendRedirectCompatibilty())
                  {
                      // append webapp context and relative URI
                      url.append(webAppRootURI);
                      url.append(relativeURI);
                  }
                  else
                  {
                      url.append(relativeURI);
                  }
                  // 115010 - end
                  redirectURL = url.toString();
              }
              else
              {
                  // not relative to webapp context root, but relative to the presently
                  // invoked URL
  
                  String requestString = HttpUtils.getRequestURL((HttpServletRequest) request).toString();
                  String pathInfo = request.getPathInfo();
                  // start PI22830
                  if(!webAppRootURI.equals("/") && request.getRequestURI().equals(webAppRootURI)){
                      requestString = requestString + "/";
                      if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
                          logger.logp(Level.FINE, CLASS_NAME,"convertRelativeURIToURL", "appended / to requestString --> " + requestString);
                  } // end PI22830
  
                  if ((pathInfo != null) && (pathInfo.length() > 0))
                  {
                      if (!pathInfo.startsWith("/"))
                      {
                          pathInfo = "/" + pathInfo;
                      }
                      //start PK23779
  
                      if(redirectWithPathInfo || (com.ibm.ws.webcontainer.osgi.WebContainer.getServletContainerSpecLevel() >= 31)){
                          requestString = requestString.substring(0, requestString.lastIndexOf("/"));
                      }
                      else{
                          // Remove the PathInfo from the request
                          requestString = requestString.substring(0, requestString.lastIndexOf(pathInfo));
                      }
                      //end PK23779
                      redirectURL = requestString + "/" + relativeURI;
                  }
                  else
                  {
                      redirectURL = requestString.substring(0, requestString.lastIndexOf('/') + 1) + relativeURI;
                  }
              }
              if (redirectURL.indexOf("..") > -1)
              { // only normalize where required.. this is expensive.
                  int skip = new String(urlScheme + "://").length();
                  int split = redirectURL.indexOf("/", skip);
                  String serverString = redirectURL.substring(0, split);
                  String uri = redirectURL.substring(split);
                  uri = getWebApp().normalize(uri);
                  if (uri != null)
                  {
                      return serverString + uri;
                  }
              }
              else
              { // return url since it is already normalized.
                  return redirectURL;
              }
              // 112000 - end
          }
          catch (Exception ex)
          {
              com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(ex, "com.ibm.ws.webcontainer.webapp.WebAppDispatcherResponse.convertRelativeURIToURL", "256", this);
          }
  
          // Could not convert
          return relativeURI;
      }