@SuppressWarnings("rawtypes") public final class GrailsWebUtil extends Object
Utility methods for clients using the web framework.
| Modifiers | Name | Description |
|---|---|---|
static String |
DEFAULT_ENCODING |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static GrailsApplication |
currentApplication()
|
|
public static Map |
currentConfiguration()
|
|
public static String |
getContentType(String name, String encoding) |
|
public static GroovyObject |
getControllerFromRequest(HttpServletRequest request)Obtains the currently executing controller from the given request if any. |
|
public static String |
getUriFromRequest(HttpServletRequest request)Retrieves the URI from the request from either the include attribute or the request.getRequestURI() method. |
|
public static GrailsApplication |
lookupApplication(ServletContext servletContext)Looks up a GrailsApplication instance from the ServletContext. |
Obtains the currently executing controller from the given request if any.
request - The request objectRetrieves the URI from the request from either the include attribute or the request.getRequestURI() method.
request - The HttpServletRequest instanceLooks up a GrailsApplication instance from the ServletContext.
servletContext - The ServletContext