Re: T5: ServletRequestFilter and dependency injection

2009-09-04 Thread neo anderson
It looks like if an non-default constructor defined in such class. it request to bind interface for that argument as well. For instance, if in MyFilter class which implements HttpServletRequestFilter interface, an argument is provided as below: public MyFilter(RealmSecurityManager securityMana

Re: T5: ServletRequestFilter and dependency injection

2009-09-04 Thread neo anderson
Now this method looks working (without no service implements ... error). But the constructor arg FilterConfig is still null. Looks like the constructor doesn't get called. Is there any additional setting I need to configure so that HttpServletRequestFilter impl class can obtain the desire in

Re: T5: ServletRequestFilter and dependency injection

2009-09-03 Thread neo anderson
I follow this setting to add my own request filter. However, I notice that if I, for instance, add public MyHttpServletRequestFilter(final FilterConfig filterConfig) { this.filterConfig = filterConfig; } in the constructor, when accessing to the url e.g. http://l

Re: T5: ServletRequestFilter and dependency injection

2008-02-07 Thread Robert Zeigler
You can use the constructor. For example, if you had a servlet request filter called "MyHttpServletRequestFilter", you would have something like: MyHttpServletRequestFilter.java : MyHttpServletRequestFilter implements ServletRequestFilter { private final Logger _logger; public