My question is simple. I'm trying to inject a property value into a filter. In my controller class, I used the following code and I could inject the property successfully:

```
@Controller
public class StatementController {
    @Value("${xapi.version}")
    private String version;
...
}

```

but when I use the same code in a custom filter,I get a null value in version property. This is the code:

```
public class HeaderFilter extends OncePerRequestFilter {

    @Value("${xapi.version}")
    private String version;
    private Logger logger = Logger.getLogger(this.getClass());

    @Override
    protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
logger.error(version==null);
...

```

I'm using springframework 4.0.9 and this is a fragment of my filter configuration in web.xml:

```
<filter>
        <filter-name>header</filter-name>
        <filter-class>com.application.HeaderFilter</filter-class>
    </filter>
<filter-mapping>
        <filter-name>header</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

```