I’m new to richfaces and I want to support a bean class using annotation instead of xml configuration [just like JSF 2.0] I’m using richfaces 4.0 and included all required jars in my build path. but when I tried to import javax.faces.bean.*; it through an no package found error. if I include the core JSF2.0 jar from mojarra it compiles fine but when expoted as an war file the tomcat v7 raising an error and my project fail to execute.
any help please.
P.S. without any beans, the project works well
That’s right. Tomcat doesn’t ship with any JSF libraries out the box. RichFaces4 also doesn’t ship with any particular JSF implementation. You need to have
jsf-api.jarandjsf-impl.jarin/WEB-INF/libfolder.You need to ensure that your
/WEB-INF/faces-config.xmlis declared conform JSF 2.0 spec.You also need to ensure that your
/WEB-INF/web.xmlis declared conform Servlet 3.0 spec or at least Servlet 2.5 spec.