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

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -