spring-framework / org.springframework.web.context.support / ServletContextResource / <init>

<init>

ServletContextResource(servletContext: ServletContext, path: String)

Create a new ServletContextResource.

The Servlet spec requires that resource paths start with a slash, even if many containers accept paths without leading slash too. Consequently, the given path will be prepended with a slash if it doesn't already start with one.

Parameters

servletContext - the ServletContext to load from

path - the path of the resource