I have a filter which checks third part session variables and cookies to determine if a given user is logged in. In this servlet, I have to retrieve user's data (if user is logged in 3rd party session, this filter queries a database to check authorizations, for example).
But @Autowired services (eg. userService) are being null in runtime, throwing null point exceptions. Is there a trick in order to autowire components in filters, differently of what we do in servlets? Thanks!