public final class ServletUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static ApplicationContext |
getApplicationContext(javax.servlet.ServletContext servletContext)
Returns the application context getting it from the servlet context.
|
static javax.servlet.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(javax.servlet.ServletException ex,
String message)
Wraps a ServletException to create an IOException with the root cause if present.
|
public static IOException wrapServletException(javax.servlet.ServletException ex, String message)
ex - The exception to wrap.message - The message of the exception.public static ApplicationContext getApplicationContext(javax.servlet.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 javax.servlet.ServletContext getServletContext(ApplicationContext applicationContext)
applicationContext - The application context to analyze.NotAServletEnvironmentException - If the application context is not
servlet-based.Copyright © 2000–2025 Apache Software Foundation. All rights reserved.