Servlet Filter extension point not instantiated. [message #1034072] |
Thu, 04 April 2013 21:12  |
Eclipse User |
|
|
|
Hi I am struggling with getting a redirect filter to work. I have created a RedirectServletFilter as below.
public class RedirectServletFilter implements Filter {
public RedirectServletFilter(){
super();
System.out.println("I am alive...");
}
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws ServletException,
IOException {
...
In my plugin.xml I define the extension point as follows:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.7"?>
<plugin>
<extension point="org.eclipse.equinox.http.registry.filters">
<filter alias="/aap"
class="my.RedirectServletFilter"
load-on-startup="true">
</filter>
</extension>
</plugin>
As far as I can see, all the required bundles are loaded and running:
osgi> ss http
id State Bundle
36 ACTIVE org.eclipse.equinox.http.servlet_1.1.200.v20110502
37 ACTIVE org.eclipse.equinox.http.jetty_2.0.100.v20110502
38 ACTIVE org.eclipse.equinox.http.registry_1.1.100.v20110502
osgi> ss registry
id State Bundle
38 ACTIVE org.eclipse.equinox.http.registry_1.1.100.v20110502
39 ACTIVE org.eclipse.equinox.registry_3.5.200.v20110718-1559
But when I browser to the URL, the Filter class is never hit.
I must be missing something. Any suggestions are greatly appreciated.
Kind Regards,
Erwin
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07342 seconds