grails.util
Class GrailsWebUtil

java.lang.Object
  extended by grails.util.GrailsWebUtil

public class GrailsWebUtil
extends Object

Utility methods for clients using the web framework

Since:
0.4

Created: Jan 19, 2007 Time: 6:18:22 PM

Author:
Graeme Rocher

Constructor Summary
GrailsWebUtil()
           
 
Method Summary
static GrailsWebRequest bindMockWebRequest()
           
static GrailsWebRequest bindMockWebRequest(GrailsWebApplicationContext ctx)
           
static String getContentType(String name, String encoding)
           
static groovy.lang.GroovyObject getControllerFromRequest(HttpServletRequest request)
           
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
 

Constructor Detail

GrailsWebUtil

public GrailsWebUtil()
Method Detail

bindMockWebRequest

public static GrailsWebRequest bindMockWebRequest(GrailsWebApplicationContext ctx)

bindMockWebRequest

public static GrailsWebRequest bindMockWebRequest()

getUriFromRequest

public static String getUriFromRequest(HttpServletRequest request)
Retrieves the URI from the request from either the include attribute or the request.getRequestURI() method

Parameters:
request - The HttpServletRequest instance
Returns:
The String URI

getControllerFromRequest

public static groovy.lang.GroovyObject getControllerFromRequest(HttpServletRequest request)

getContentType

public static String getContentType(String name,
                                    String encoding)


Copyright (c) 2005-2006 The Grails project