|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.util.WebUtils org.codehaus.groovy.grails.web.util.WebUtils
public class WebUtils
Utility methods to access commons objects and perform common web related functions for the internal framework
Field Summary | |
---|---|
static String |
ENABLE_FILE_EXTENSIONS
|
static char |
SLASH
|
Constructor Summary | |
---|---|
WebUtils()
|
Method Summary | |
---|---|
static boolean |
areFileExtensionsEnabled()
Returns the value of the "grails.mime.file.extensions" setting configured in COnfig.groovy |
static String |
buildDispatchUrlForMapping(UrlMappingInfo info)
Constructs the URI to forward to using the given request and UrlMappingInfo instance |
static String |
forwardRequestForUrlMappingInfo(HttpServletRequest request,
HttpServletResponse response,
UrlMappingInfo info)
|
static String |
forwardRequestForUrlMappingInfo(HttpServletRequest request,
HttpServletResponse response,
UrlMappingInfo info,
Map model)
|
static String |
getFormatFromURI(String uri)
Obtains the format from the URI. |
static GrailsApplication |
lookupApplication(ServletContext servletContext)
Looks up the GrailsApplication instance |
static UrlMappingsHolder |
lookupUrlMappings(ServletContext servletContext)
Looks up the UrlMappingsHolder instance |
static ViewResolver |
lookupViewResolver(ServletContext servletContext)
|
static View |
resolveView(HttpServletRequest request,
String viewName,
String controllerName,
ViewResolver viewResolver)
Resolves a view for the given view name and controller name |
static View |
resolveView(HttpServletRequest request,
UrlMappingInfo info,
String viewName,
ViewResolver viewResolver)
Resolves a view for the given view and UrlMappingInfo instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char SLASH
public static final String ENABLE_FILE_EXTENSIONS
Constructor Detail |
---|
public WebUtils()
Method Detail |
---|
public static ViewResolver lookupViewResolver(ServletContext servletContext)
public static UrlMappingsHolder lookupUrlMappings(ServletContext servletContext)
servletContext
- The ServletContext object
public static GrailsApplication lookupApplication(ServletContext servletContext)
public static View resolveView(HttpServletRequest request, UrlMappingInfo info, String viewName, ViewResolver viewResolver) throws Exception
request
- The requestinfo
- The infoviewName
- The view nameviewResolver
- The view resolver
Exception
public static View resolveView(HttpServletRequest request, String viewName, String controllerName, ViewResolver viewResolver) throws Exception
request
- The requestviewName
- The view namecontrollerName
- The controller nameviewResolver
- The resolver
Exception
- Thrown if an error occurspublic static String buildDispatchUrlForMapping(UrlMappingInfo info)
info
- The UrlMappingInfo
public static String forwardRequestForUrlMappingInfo(HttpServletRequest request, HttpServletResponse response, UrlMappingInfo info) throws ServletException, IOException
ServletException
IOException
public static String forwardRequestForUrlMappingInfo(HttpServletRequest request, HttpServletResponse response, UrlMappingInfo info, Map model) throws ServletException, IOException
ServletException
IOException
public static String getFormatFromURI(String uri)
uri
- The URI
public static boolean areFileExtensionsEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |