code: public static String getFinalTarget(Resource resource) throws RedirectLoopException {
          ResourceHandle handle = ResourceHandle.use(resource);
          String finalTarget = getFinalTarget(handle, new ArrayList<String>());
          return finalTarget;
      }
docs: Retrieves the target for a resource if there are redirects declared.
  
  @return the target path or url (can be external); 'null' if no redirect detected
  @throws RedirectLoopException if a 'loop' has been detected during redirect resolving