Version :
RichFaces 4.3.5
Apache MyFaces 2.1
Tomcat 6
Issue :
We are using JSF2 . I am not able to invoke a managed bean action method using annotation.
Below is the code for managed bean.
@ManagedBean(name="controller")
@RequestScoped
public class Controller {
public String getUserName(){
}
}
The bean has been invoked like below :
sample.xhtml :
#{controller.userName}
I have checked that all the faces-config.xml
in my web application adhere to JSF2 namespace.
I am using tomcat 6 to deploy the web application.
When same bean is added in faces-config.xml
,the bean method gets executed successfully.
Is there anything else I need to take care for this to work ? Please help .