I wrote a jsf application, this app inserts the data into mysql database and shows some of the inserted details in another page.
I am successful in inserting the values into database, but unable to redirect to the other page even after writing the navigation rule.
My action code
<div align="center"><p:commandButton label="Submit" action="#{userData.add}" align="center" ajax="false" /></div> Navigation rule
<managed-bean> <managed-bean-name>UserData</managed-bean-name> <managed-bean-class>userData.UserData</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <navigation-rule> <display-name>home.xhtml</display-name> <from-view-id>/home.xhtml</from-view-id> <navigation-case> <to-view-id>/badge.xhtml</to-view-id> </navigation-case> </navigation-rule> If i write the face-redirect true then its showning an error, or if i write the action to the other page then its not inserting the values to database.