The main difference to a plain servlet, is that the action-classes in Struts2
are created on-the-fly (... new myActionclass() ...) everytime a request comes in,
and @EJB doesnt work for such classes.
Struts action classes are not container managed classes. So container managed injection like @EJB will not work there.
But I read somewhere that CDI should be able to handle Dependency-Injection in POJOs created on-the-fly....
Is that correct?
Even with CDI, if you do a new SomeClass() then there won't be any scope for injection.