Class ServletInitContext

    • Constructor Detail

      • ServletInitContext

        public ServletInitContext​(javax.servlet.ServletContext servletContext)
        Creates a new servlet-based SPI initialisation context.
        Parameters:
        servletContext - The servlet context. Must not be null.
    • Method Detail

      • getResourceAsStream

        public @Nullable InputStream getResourceAsStream​(String path)
        Description copied from interface: InitContext
        Returns the resource located at the named path as an input stream. Has the same behaviour as ServletContext.getResourceAsStream(java.lang.String).
        Specified by:
        getResourceAsStream in interface InitContext
        Parameters:
        path - The path to the resource, must be begin with a '/' and is interpreted as relative to the web application root. Must not be null.
        Returns:
        The resource as an input stream, or null if no resource exists at the specified path.