public class ServletInitContext extends Object implements InitContext
Constructor and Description |
---|
ServletInitContext(javax.servlet.ServletContext servletContext)
Creates a new servlet-based SPI initialisation context.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getResourceAsStream(String path)
Returns the resource located at the named path as an input stream.
|
javax.servlet.ServletContext |
getServletContext()
Returns the servlet context.
|
public ServletInitContext(javax.servlet.ServletContext servletContext)
servletContext
- The servlet context. Must not be null
.public javax.servlet.ServletContext getServletContext()
public InputStream getResourceAsStream(String path)
InitContext
ServletContext.getResourceAsStream(java.lang.String)
.getResourceAsStream
in interface InitContext
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
.null
if no
resource exists at the specified path.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.