public class UrlMappingUtils
extends java.lang.Object
| Constructor and Description |
|---|
UrlMappingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildDispatchUrlForMapping(UrlMappingInfo info)
Constructs the URI to forward to using the given request and UrlMappingInfo instance
|
static java.lang.String |
forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info) |
static java.lang.String |
forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model) |
static java.lang.String |
forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model,
boolean includeParams)
Forwards a request for the given UrlMappingInfo object and model
|
static org.codehaus.groovy.grails.commons.GrailsClass |
getConfiguredControllerForUrlMappingInfo(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info,
grails.web.UrlConverter urlConverterToUse,
org.codehaus.groovy.grails.commons.GrailsApplication grailsApplicationToUse)
Deprecated.
|
static java.lang.String |
getControllerFeatureURI(grails.web.UrlConverter urlConverter,
java.lang.String controller,
java.lang.String action) |
static org.codehaus.groovy.grails.commons.ControllerArtefactHandler.ControllerCacheKey |
getFeatureId(grails.web.UrlConverter urlConverter,
UrlMappingInfo info) |
static org.codehaus.groovy.grails.web.util.IncludedContent |
includeForUrl(java.lang.String includeUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.Map model)
Includes the given URL returning the resulting content as a String
|
static org.codehaus.groovy.grails.web.util.IncludedContent |
includeForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model)
Include whatever the given UrlMappingInfo maps to within the current response
|
static UrlMappingsHolder |
lookupUrlMappings(javax.servlet.ServletContext servletContext)
Looks up the UrlMappingsHolder instance
|
protected static void |
passControllerForForwardedRequest(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info) |
static org.codehaus.groovy.grails.commons.GrailsClass |
passControllerForUrlMappingInfoInRequest(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info,
grails.web.UrlConverter urlConverterToUse,
org.codehaus.groovy.grails.commons.GrailsApplication grailsApplicationToUse) |
static org.springframework.web.servlet.View |
resolveView(javax.servlet.http.HttpServletRequest request,
UrlMappingInfo info,
java.lang.String viewName,
org.springframework.web.servlet.ViewResolver viewResolver)
Resolves a view for the given view and UrlMappingInfo instance
|
public static UrlMappingsHolder lookupUrlMappings(javax.servlet.ServletContext servletContext)
servletContext - The ServletContext objectpublic static org.springframework.web.servlet.View resolveView(javax.servlet.http.HttpServletRequest request,
UrlMappingInfo info,
java.lang.String viewName,
org.springframework.web.servlet.ViewResolver viewResolver)
throws java.lang.Exception
request - The requestinfo - The infoviewName - The view nameviewResolver - The view resolverjava.lang.Exceptionpublic static java.lang.String buildDispatchUrlForMapping(UrlMappingInfo info)
info - The UrlMappingInfopublic static java.lang.String forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionforwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.codehaus.groovy.grails.web.mapping.UrlMappingInfo, java.util.Map)public static java.lang.String forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionforwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.codehaus.groovy.grails.web.mapping.UrlMappingInfo, java.util.Map, boolean)public static java.lang.String forwardRequestForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model,
boolean includeParams)
throws javax.servlet.ServletException,
java.io.IOException
request - The requestresponse - The responseinfo - The UrlMappingInfo objectmodel - The ModelincludeParams - Whether to include any request parametersjavax.servlet.ServletException - Thrown when an error occurs executing the forwardjava.io.IOException - Thrown when an error occurs executing the forwardprotected static void passControllerForForwardedRequest(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info)
public static org.codehaus.groovy.grails.web.util.IncludedContent includeForUrlMappingInfo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UrlMappingInfo info,
java.util.Map model)
request - The requestresponse - The responseinfo - The UrlMappingInfomodel - The modelpublic static org.codehaus.groovy.grails.web.util.IncludedContent includeForUrl(java.lang.String includeUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.Map model)
includeUrl - The URL to includerequest - The requestresponse - The responsemodel - The modelpublic static org.codehaus.groovy.grails.commons.GrailsClass passControllerForUrlMappingInfoInRequest(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info,
grails.web.UrlConverter urlConverterToUse,
org.codehaus.groovy.grails.commons.GrailsApplication grailsApplicationToUse)
public static org.codehaus.groovy.grails.commons.ControllerArtefactHandler.ControllerCacheKey getFeatureId(grails.web.UrlConverter urlConverter,
UrlMappingInfo info)
public static java.lang.String getControllerFeatureURI(grails.web.UrlConverter urlConverter,
java.lang.String controller,
java.lang.String action)
@Deprecated
public static org.codehaus.groovy.grails.commons.GrailsClass getConfiguredControllerForUrlMappingInfo(org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest webRequest,
UrlMappingInfo info,
grails.web.UrlConverter urlConverterToUse,
org.codehaus.groovy.grails.commons.GrailsApplication grailsApplicationToUse)