At least add empty beans.xml file to META-INF/ or WEB-INF/ in your archive.
There are other things you may need to do but that depends on your runtime environment.
There's a nice config example for Tomcat
How to make the conversion of a project with managed beans to one with CDI Beans?
-
17-06-2023 - |
Question
I tried to convert managed Beans ManagedBeans to CDIBeans simply by including @Named and @XxxScoped from javax.entreprise.context package. Along with the two JAR files cdi-api-1.1-PRD.jar javax.inject-1.jar. But it seem to be not as simple as that.
- I wanted to know why?
- Why isn't the above mentioned process working?
Shouldn't CDI beans support functionalities of managed beans? Am I totally missing something here?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow