I have created new project via Java Web
->WebApplication
->Enabled CDI
My First question is: Why @Inject annotation showing error? even though bean.xml
added.
As mentioned in injects documentation, it is applicable to constructors, methods and fields. Not classes.
For question 2, please refer to this other question