Package org.broadleafcommerce.cms.web
Class URLHandlerFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
org.broadleafcommerce.cms.web.URLHandlerFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.core.Ordered,org.springframework.web.context.ServletContextAware
@Component("blURLHandlerFilter")
@ConditionalOnNotAdmin
public class URLHandlerFilter
extends org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
Responsible for setting up the site and locale used by Broadleaf Commerce components.
- Author:
- bpolster
-
Field Summary
FieldsFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternalUnlessIgnored(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) protected StringfixQueryString(jakarta.servlet.http.HttpServletRequest request, String url) If the url does not include "//" then the system will ensure that the application context is added to the start of the URL.intgetOrder()protected booleanMethods inherited from class org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
doFilterInternal, isIgnoredMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
charEncoding
-
-
Constructor Details
-
URLHandlerFilter
public URLHandlerFilter()
-
-
Method Details
-
getExistingQueryParams
- Throws:
UnsupportedEncodingException
-
doFilterInternalUnlessIgnored
protected void doFilterInternalUnlessIgnored(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException - Specified by:
doFilterInternalUnlessIgnoredin classorg.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter- Throws:
jakarta.servlet.ServletExceptionIOException
-
fixQueryString
If the url does not include "//" then the system will ensure that the application context is added to the start of the URL.- Parameters:
url-- Returns:
- Throws:
Exception
-
getPreserveQueryStringOnRedirect
protected boolean getPreserveQueryStringOnRedirect() -
getOrder
public int getOrder()
-