
public final class ServletUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static ApplicationContext |
getApplicationContext(ServletContext servletContext)
Returns the application context getting it from the servlet context.
|
static ServletContext |
getServletContext(ApplicationContext applicationContext)
Gets a servlet context from a TilesApplicationContext.
|
static ServletRequest |
getServletRequest(Request request)
Opens a TilesRequestContext until it finds a ServletTilesRequestContext.
|
static IOException |
wrapServletException(ServletException ex,
String message)
Wraps a ServletException to create an IOException with the root cause if present.
|
public static IOException wrapServletException(ServletException ex, String message)
ex - The exception to wrap.message - The message of the exception.public static ApplicationContext getApplicationContext(ServletContext servletContext)
ServletApplicationContext and using
ApplicationAccess.register(ApplicationContext).servletContext - The servlet context.null otherwise.public static ServletRequest getServletRequest(Request request)
request - The request to open.NotAServletEnvironmentException - If a servlet-based request
context could not be found.public static ServletContext getServletContext(ApplicationContext applicationContext)
applicationContext - The application context to analyze.NotAServletEnvironmentException - If the application context is not
servlet-based.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.