Inject « Filter « JSP-Servlet Q&A





1. My properties are not injected in my perso-servlet.xml (Maven2)    stackoverflow.com

I don't understand why my properties are not injected in my perso-servlet.xml :

<!--  Facebook OAuth helper -->
<bean id="FacebookOAuthHelper" class="com.myapp.businessservices.common.facebook.FacebookOAuthHelper"
    p:apiKey="${facebook.apiKey}"
    p:secretkey="${facebook.secretkey}"
    ...

2. @Inject in filter doesn't work    stackoverflow.com

As far as I know, CDI should work in filters, but I can't get it to work for me. Code looks like the following:

@WebFilter(filterName="authFilter",servletNames={"Faces Servlet"})
public class AuthFilter implements Filter {

  ...