public class HstFilter extends Object implements javax.servlet.Filter
Modifier and Type | Field and Description |
---|---|
static String |
CLIENT_COMPONENT_MANAGER_CLASS_INIT_PARAM |
static String |
CLIENT_COMPONENT_MANAGER_CONFIGURATIONS_INIT_PARAM |
static String |
CLIENT_COMPONENT_MANAGER_CONTEXT_ATTRIBUTE_NAME_INIT_PARAM |
static String |
CLIENT_COMPONENT_MANANGER_DEFAULT_CONTEXT_ATTRIBUTE_NAME |
static String |
CLIENT_REDIRECT_AFTER_JAAS_LOGIN_BEHIND_PROXY |
protected ComponentManager |
clientComponentManager |
protected String |
clientComponentManagerClassName |
protected String[] |
clientComponentManagerConfigurations |
protected String |
clientComponentManagerContextAttributeName |
static String |
CONTEXT_NAMESPACE_INIT_PARAM |
protected String |
contextNamespace |
protected HstManager |
currentManagerInstance |
protected boolean |
doClientRedirectAfterJaasLoginBehindProxy |
protected boolean |
initialized |
static String |
PREFIX_EXCLUSIONS_INIT_PARAM |
protected HstContainerConfig |
requestContainerConfig |
static String |
SUFFIX_EXCLUSIONS_INIT_PARAM |
Constructor and Description |
---|
HstFilter() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanupResourceLifecycleManagements()
Cleaning up resources when the entire hst request processing got skipped but there was already a jcr session taken
from the session pool.
|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
protected void |
doInit(javax.servlet.FilterConfig config) |
static ComponentManager |
getClientComponentManager(javax.servlet.ServletContext servletContext)
Returns the client component manager instance if available.
|
void |
init(javax.servlet.FilterConfig filterConfig) |
static void |
initializeResourceLifecycleManagements() |
protected boolean |
isCrossContextInclude(javax.servlet.http.HttpServletRequest request)
Deprecated.
portlet support will be removed after 2.26.xx
|
protected ResolvedSiteMapItem |
processHandlers(ResolvedSiteMapItem orginalResolvedSiteMapItem,
HstSiteMapItemHandlerFactory siteMapItemHandlerFactory,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.FilterChain filterChain)
This method is invoked for every
HstSiteMapItemHandler from the resolvedSiteMapItem that was matched from ResolvedMount.matchSiteMapItem(String) . |
protected void |
processResolvedSiteMapItem(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.FilterChain filterChain,
HstManager hstSitesManager,
HstSiteMapItemHandlerFactory siteMapItemHandlerFactory,
HstMutableRequestContext requestContext,
boolean processHandlers,
Logger logger) |
public static final String CONTEXT_NAMESPACE_INIT_PARAM
public static final String CLIENT_REDIRECT_AFTER_JAAS_LOGIN_BEHIND_PROXY
public static final String CLIENT_COMPONENT_MANAGER_CLASS_INIT_PARAM
public static final String CLIENT_COMPONENT_MANAGER_CONFIGURATIONS_INIT_PARAM
public static final String CLIENT_COMPONENT_MANAGER_CONTEXT_ATTRIBUTE_NAME_INIT_PARAM
public static final String CLIENT_COMPONENT_MANANGER_DEFAULT_CONTEXT_ATTRIBUTE_NAME
public static final String PREFIX_EXCLUSIONS_INIT_PARAM
public static final String SUFFIX_EXCLUSIONS_INIT_PARAM
protected String contextNamespace
protected boolean doClientRedirectAfterJaasLoginBehindProxy
protected String clientComponentManagerClassName
protected String[] clientComponentManagerConfigurations
protected volatile boolean initialized
protected ComponentManager clientComponentManager
protected String clientComponentManagerContextAttributeName
protected volatile HstContainerConfig requestContainerConfig
protected HstManager currentManagerInstance
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
protected void doInit(javax.servlet.FilterConfig config)
public static ComponentManager getClientComponentManager(javax.servlet.ServletContext servletContext)
servletContext
- public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public static void cleanupResourceLifecycleManagements()
HstSiteMapItemHandler
impl calls HstRequestContext.getSession()
and the returns null
from its HstSiteMapItemHandler.process(org.hippoecm.hst.core.request.ResolvedSiteMapItem, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
method, short circuiting the hst request handling (thus, during request matching, not even invoking a single Valve
)public static void initializeResourceLifecycleManagements()
protected void processResolvedSiteMapItem(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, javax.servlet.FilterChain filterChain, HstManager hstSitesManager, HstSiteMapItemHandlerFactory siteMapItemHandlerFactory, HstMutableRequestContext requestContext, boolean processHandlers, Logger logger) throws ContainerException
ContainerException
protected ResolvedSiteMapItem processHandlers(ResolvedSiteMapItem orginalResolvedSiteMapItem, HstSiteMapItemHandlerFactory siteMapItemHandlerFactory, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, javax.servlet.FilterChain filterChain)
HstSiteMapItemHandler
from the resolvedSiteMapItem that was matched from ResolvedMount.matchSiteMapItem(String)
.
If in the for loop the orginalResolvedSiteMapItem
switches to a different newResolvedSiteMapItem, then still
the handlers for orginalResolvedSiteMapItem
are processed and not the one from newResolvedSiteMapItem
. If some intermediate
HstSiteMapItemHandler.process(ResolvedSiteMapItem, HttpServletRequest, HttpServletResponse)
returns null
, the loop and processing is stooped,
and null
is returned. Entire request processing at that point is assumed to be completed already by one of the HstSiteMapItemHandler
s (for
example if one of the handlers is a caching handler). When null
is returned, request processing is stopped.orginalResolvedSiteMapItem
- siteMapItemHandlerFactory
- req
- res
- ResolvedSiteMapItem
, or null
when request processing can be stoppedpublic void destroy()
destroy
in interface javax.servlet.Filter
@Deprecated protected boolean isCrossContextInclude(javax.servlet.http.HttpServletRequest request)
request
- Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.