Interface ContextResource

All superinterfaces:
Inputstreamsource, Resource
All Known Implementing Classes:
DefaultResourceLoader.ClassPathContextResource, servletContextResource

public interface ContextResource extends Resource
Extended interface for a resource that is loaded from an enclosing 'context', for example, from a servletContext but also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the local ResourceLoader's context).
since:
2.5
Author:
Juergen Hoeller
see Also:
  • Method Details

    • getPathWithinContext

      string getPathWithinContext()
      Return the path within the enclosing 'context'.

      This is typically path relative to a context-specific root directory, for example, a servletContext root.