Inject HttpServletRequest to CDI SessionScoped bean
I've got a session scoped CDI bean, and I need to somehow access
HttpServletRequest object in this bean's @PostConstruct method. Is it
possible? I've tried to Inject such an object, but it results in:
WELD-001408 Unsatisfied dependencies for type [HttpServletRequest] with
qualifiers [@Default] at injection point [[field] @Inject ...]
As I understood while googling, Seam framework has such a functionality,
but I have standard JEE application on Glassfish server. Is it even
possible to somehow pass request to CDI's bean @PostConstruct method?
No comments:
Post a Comment