public class ServletTilesApplicationContext extends java.lang.Object implements TilesApplicationContext
Constructor and Description |
---|
ServletTilesApplicationContext(ServletContext servletContext)
Creates a new instance of ServletTilesApplicationContext.
|
Modifier and Type | Method and Description |
---|---|
TilesRequestContext |
createRequestContext(java.lang.Object request,
java.lang.Object response)
|
java.util.Map<java.lang.String,java.lang.Object> |
getApplicationScope()
Returns a mutable Map that maps application scope attribute names to
their values.
|
java.lang.Object |
getContext()
Returns the original, technology-dependent, context.
|
java.util.Map<java.lang.String,java.lang.String> |
getInitParams()
Return an immutable Map that maps context application initialization
parameters to their values.
|
java.net.URL |
getResource(java.lang.String path)
Return a URL for the application resource mapped to the specified path.
|
java.util.Set<java.net.URL> |
getResources(java.lang.String path)
Return a URL for the application resource mapped to the specified path.
|
ServletContext |
getServletContext()
Deprecated.
Use
getContext() . |
void |
initialize(ServletContext context)
Initialize (or reinitialize) this
TilesApplicationContext instance
for the specified Servlet API objects. |
void |
release()
Release references to allocated resources acquired in
initialize() of via subsequent processing. |
public ServletTilesApplicationContext(ServletContext servletContext)
servletContext
- The servlet context to use.public java.lang.Object getContext()
getContext
in interface TilesApplicationContext
public java.util.Map<java.lang.String,java.lang.Object> getApplicationScope()
getApplicationScope
in interface TilesApplicationContext
public java.util.Map<java.lang.String,java.lang.String> getInitParams()
getInitParams
in interface TilesApplicationContext
public java.net.URL getResource(java.lang.String path) throws java.io.IOException
getResource
in interface TilesApplicationContext
path
- to the desired resource.java.io.IOException
- if the path is malformedpublic java.util.Set<java.net.URL> getResources(java.lang.String path) throws java.io.IOException
getResources
in interface TilesApplicationContext
path
- to the desired resource.java.io.IOException
- if the url is illegalpublic ServletContext getServletContext()
getContext()
.public void initialize(ServletContext context)
Initialize (or reinitialize) this TilesApplicationContext
instance
for the specified Servlet API objects.
context
- The ServletContext
for this web applicationpublic void release()
Release references to allocated resources acquired in
initialize()
of via subsequent processing. After this
method is called, subsequent calls to any other method than
initialize()
will return undefined results.
public TilesRequestContext createRequestContext(java.lang.Object request, java.lang.Object response)
TilesRequestContextFactory.createRequestContext(TilesApplicationContext, Object...)
.request
- The request object.response
- The response object.