code: protected Template selectTemplate (int siteId, InvocationContext ctx)
          throws ResourceNotFoundException, ParseErrorException, Exception
      {
          String path = ctx.getRequest().getServletPath();
          if (_usingSiteLoading) {
              // if we're using site resource loading, we need to prefix the path with the site
              // identifier
              path = siteId + ":" + path;
          }
          // log.info("Loading template", "path", path);
          return RuntimeSingleton.getTemplate(path);
      }
docs: This method is called to select the appropriate template for this request. The default
  implementation simply loads the template using Velocity's default template loading services
  based on the URI provided in the request.
  
  @param ctx The context of this request.
  
  @return The template to be used in generating the response.