Hi Guys,
I wanted to build a simple hello world app with
JSF 2.
Below is what I did for this.
1) created
maven web app in eclipse
2) Added JSF2 maven dependency (2.2.4) and tomcat7 plugin in pom.xml
3) Updated web.xml config to redirect to a xhtml page based on url
pattern
4) Created session scoped managed bean (with annotation) and a simple getter / setter in it.
5) Created xhtml that has binding to the message from the above managed bean.
I then built war with 'clean install tomcat7:run'. This created war file and the app is available at
http://localhost:8080/jsf-prac
When I hit this URL, the annotation based managed bean is not initiated at all. Thus, the message from managed bean is not displayed on screen.
Please find the hello world web app here -
https://github.com/rkintali/jsf-prac.git
Could you please advise why the managed bean is not initiated?
Upon googling, I noticed
here that @ManagedBean of Mojarra 2.1.0 doesn't work on
Tomcat. Hence used version 2.2.4, but still no luck. Do you have any idea?
Kind regards,
Guru