diff --git a/core/src/main/java/org/acegisecurity/util/FilterToBeanProxy.java b/core/src/main/java/org/acegisecurity/util/FilterToBeanProxy.java
index 3d77aea5a3..4ff3921860 100644
--- a/core/src/main/java/org/acegisecurity/util/FilterToBeanProxy.java
+++ b/core/src/main/java/org/acegisecurity/util/FilterToBeanProxy.java
@@ -28,32 +28,40 @@ import java.util.Map;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
/**
- * Delegates Filter
requests to a Spring-managed bean.
This class acts as a proxy on behalf of a + *
Delegates Filter
requests to a Spring-managed bean.
This class acts as a proxy on behalf of a
* target Filter
that is defined in the Spring bean context. It is necessary to specify which target
* Filter
should be proxied as a filter initialization parameter.
On filter initialisation, the class will use Spring's {@link + * + *
On filter initialisation, the class will use Spring's {@link
* WebApplicationContextUtils#getWebApplicationContext(ServletContext sc)} method to obtain an
* ApplicationContext
instance. It will expect to find the target Filter
in this
* ApplicationContext
.
To use this filter, it is necessary to specify one of the following filter initialization parameters:
+ * + *To use this filter, it is necessary to specify one of the following filter initialization parameters: *
targetClass
indicates the class of the target Filter
defined in the bean
* context. The only requirements are that this target class implements the javax.servlet.Filter
* interface and at least one instance is available in the ApplicationContext
.targetBean
indicates the bean name of the target class.targetBean
takes priority.An additional
+ * If both initialization parameters are specified, targetBean
takes priority.
An additional
* initialization parameter, init
, is also supported. If set to "lazy
" the initialization
* will take place on the first HTTP request, rather than at filter creation time. This makes it possible to use
* FilterToBeanProxy
with the Spring ContextLoaderServlet
. Where possible you should not use
* this initialization parameter, instead using ContextLoaderListener
.
A final optional initialization parameter, lifecycle
, determines whether the servlet container
+ *
+ *
A final optional initialization parameter, lifecycle
, determines whether the servlet container
* or the IoC container manages the lifecycle of the proxied filter. When possible you should write your filters to be
* managed via the IoC container interfaces such as {@link org.springframework.beans.factory.InitializingBean} and
* {@link org.springframework.beans.factory.DisposableBean}. If you cannot control the filters you wish to proxy (eg