java - Navigation-rules in JSF -
i know possible set navigation-rules in faces-config.xml file. there, know option navigation in correct flow.
but want avoid user isn't logged in can directly go home screen when types url in adressbar. possible in config file or have write frontcontroller class?
my code:
<navigation-rule> <from-view-id>/login.xhtml</from-view-id> <navigation-case> <from-outcome>register</from-outcome> <to-view-id>/register.xhtml</to-view-id> </navigation-case> <navigation-case> <from-outcome>succes</from-outcome> <to-view-id>/home.xhtml</to-view-id> </navigation-case> <navigation-case> <from-outcome>fail</from-outcome> <to-view-id>/login.xhtml</to-view-id> </navigation-case> </navigation-rule> hope can me.
security not handled navigation rules. use filter handle (i suggest spring security).
Comments
Post a Comment