net.sourceforge.jfacets.web
Class WebFacetsFilter
java.lang.Object
net.sourceforge.jfacets.web.WebFacetsFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class WebFacetsFilter
- extends java.lang.Object
- implements javax.servlet.Filter
Intercepts HTTP requests and associates a jFacets bean to them. This filter is
used to inject the web stuff (request, response and servlet context) into tje system
for each request, so that we can have web-enabled contexts in facets.
It loads descriptors at init, and then provides one new instance of JFacets for each
request.
- Author:
- Remi VANKEISBELCK - rvkb.com (remi 'at' rvkb.com)
|
Method Summary |
void |
destroy()
does nothing |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Filters the request. |
void |
init(javax.servlet.FilterConfig config)
Initializes the filter. |
private void |
initError(java.lang.String msg)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final JFacetsLogger logger
appCtxName
private java.lang.String appCtxName
applicationContext
private org.springframework.context.ApplicationContext applicationContext
config
private javax.servlet.FilterConfig config
WebFacetsFilter
public WebFacetsFilter()
init
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
- Initializes the filter.
Lookups for a config param with name 'appCtxName' to load the JFacets
bean factory from (defaults to 'webFacetsAppCtx.xml').
- Specified by:
init in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
initError
private void initError(java.lang.String msg)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Filters the request.
- Specified by:
doFilter in interface javax.servlet.Filter
- Throws:
java.io.IOException
javax.servlet.ServletException
destroy
public void destroy()
- does nothing
- Specified by:
destroy in interface javax.servlet.Filter
Copyright © 2010. All Rights Reserved.