DEAR VISITOR , YOU ARE WATCHING : How to configure Tomcat 7 for JSF 2.0 - CDI (Context & Dependency Injection) and JBoss - JSF Video Tutorial .
[postlink]
https://j2ee-tutorials-videos.blogspot.com/2011/02/how-to-configure-tomcat-7-for-jsf-20.html
[/postlink]
http://www.youtube.com/watch?v=q30ICO30FGsendofvid [starttext] This is a Video Tutorial explains So, how do you use the JSR299 annotations in a JSF 2.0 application that's going to be deployed to Tomcat 7? Well, by default, Tomcat 7 does not support JSR-299, the CDI (Context and Dependency Injection) specification. So, to support JSR-299 in your Tomcat deployed web apps, you need to do a little work. One option is to download the MyFaces CODI implementation. The other is to include the JBoss/SeamFramework's implementation of JSR-299, which is better known as "Weld."
This tutorial shows you how to get the required Weld libraries, configure your web.xml file with the required listener, set up the beans.xml file, and do all of the other stuff that's needed to configure Weld in a JSF application that's going to be deployed to servlet engine like Tomcat.
Oh, and just so you know, you do need the beans.xml file if you're working with Weld, even if there is really no content in the file. If you leave it out, you'll run into a runtime exception.
[endtext]
This tutorial shows you how to get the required Weld libraries, configure your web.xml file with the required listener, set up the beans.xml file, and do all of the other stuff that's needed to configure Weld in a JSF application that's going to be deployed to servlet engine like Tomcat.
Oh, and just so you know, you do need the beans.xml file if you're working with Weld, even if there is really no content in the file. If you leave it out, you'll run into a runtime exception.
1 commentaires :
MyFaces CODI isn't an implementation of CDI! The Apache CDI implementation is OpenWebBeans. MyFaces CODI is a portable CDI extension which can be used with JBoss Weld as well as Apache OpenWebBeans.
Post a Comment