public class ServletContextResourceAccessor extends Object implements org.springframework.web.context.ServletContextAware, ResourceAccessor
ResourceAccessor
that gets resources via the servlet context.Constructor and Description |
---|
ServletContextResourceAccessor() |
Modifier and Type | Method and Description |
---|---|
InputStream |
getResource(String resourcePath)
Returns an InputStream for reading a resource.
|
void |
setServletContext(javax.servlet.ServletContext servletContext) |
public InputStream getResource(String resourcePath)
ResourceAccessor
getResource
in interface ResourceAccessor
resourcePath
- the relative URL path of the resource. For example: /images/foo.pngInputStream
for reading the resourcepublic void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface org.springframework.web.context.ServletContextAware
Copyright © 2003–2016 Atlassian. All rights reserved.