code: public static ResourceHandle getResource(SlingHttpServletRequest request) {
          ResourceResolver resolver = request.getResourceResolver();
          String path = getPath(request);
          ResourceHandle resource = ResourceHandle.use(resolver.resolve(path));
          return resource;
      }
docs: Retrieves the resource using the suffix from the request.
  
  @param request the sling request with the resource path in the suffix
  @return the resource (NOT <code>null</code>; returns a handle with an invalid resource if not resolvable)