org.codehaus.groovy.grails.web.mapping.filter
Class UrlMappingsFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter
- All Implemented Interfaces:
- Filter, BeanNameAware, DisposableBean, InitializingBean, ServletContextAware
public class UrlMappingsFilter
- extends OncePerRequestFilter
A Servlet filter that uses the Grails UrlMappings to match and forward requests to a relevant controller
and action
- Since:
- 0.5
Created: Mar 6, 2007
Time: 7:58:19 AM
- Author:
- Graeme Rocher
| Methods inherited from class org.springframework.web.filter.GenericFilterBean |
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setFilterConfig, setServletContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UrlMappingsFilter
public UrlMappingsFilter()
doFilterInternal
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws ServletException,
IOException
- Specified by:
doFilterInternal in class OncePerRequestFilter
- Throws:
ServletException
IOException
buildDispatchUrlForMapping
protected String buildDispatchUrlForMapping(HttpServletRequest request,
UrlMappingInfo info)
- Constructs the URI to forward to using the given request and UrlMappingInfo instance
- Parameters:
request - The HttpServletRequestinfo - The UrlMappingInfo
- Returns:
- The URI to forward to
lookupUrlMappings
protected UrlMappingsHolder lookupUrlMappings()
- Looks up the UrlMappingsHolder instance
- Returns:
- The UrlMappingsHolder
lookupApplication
protected GrailsApplication lookupApplication()
- Looks up the GrailsApplication instance
- Returns:
- The GrailsApplication instance
Copyright (c) 2005-2006 The Grails project