|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object grails.util.GrailsWebUtil
public class GrailsWebUtil
Utility methods for clients using the web framework
Field Summary | |
---|---|
static String |
DEFAULT_ENCODING
|
Constructor Summary | |
---|---|
GrailsWebUtil()
|
Method Summary | |
---|---|
static GrailsWebRequest |
bindMockWebRequest()
Binds a Mock implementation of a GrailsWebRequest object to the current thread. |
static GrailsWebRequest |
bindMockWebRequest(WebApplicationContext ctx)
Binds a Mock implementation of a GrailsWebRequest object to the current thread. |
static String |
getContentType(String name,
String encoding)
|
static groovy.lang.GroovyObject |
getControllerFromRequest(HttpServletRequest request)
Obtains the currently executing controller from the given request if any |
static String |
getUriFromRequest(HttpServletRequest request)
Retrieves the URI from the request from either the include attribute or the request.getRequestURI() method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_ENCODING
Constructor Detail |
---|
public GrailsWebUtil()
Method Detail |
---|
public static GrailsWebRequest bindMockWebRequest(WebApplicationContext ctx)
ctx
- The WebApplicationContext to use
MockHttpServletRequest
,
MockHttpServletResponse
,
MockServletContext
public static GrailsWebRequest bindMockWebRequest()
MockHttpServletRequest
,
MockHttpServletResponse
,
MockServletContext
public static String getUriFromRequest(HttpServletRequest request)
request
- The HttpServletRequest instance
public static groovy.lang.GroovyObject getControllerFromRequest(HttpServletRequest request)
request
- The request object
public static String getContentType(String name, String encoding)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |