|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tiles.request.servlet.ServletUtil
public final class ServletUtil
Utilities for Tiles request servlet support.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |