我有自定义的身份验证器,我想在接缝3中成功验证后重定向到主页。我怎样才能做到这一点 ??登录后重定向首页seam 3
回答
有几种方法可以做到这一点。
最简单的方法是在登录操作中登录return "/home.xhtml";
。
有没有一种方法与缝安全重定向,如果没有登录为JASS – Suraj 2011-05-12 04:51:38
另一种方式是在faces-config.xml中使用导航规则:
<navigation-rule>
<from-view-id>/loginPage.xhtml</from-view-id>
<navigation-case>
<from-action>#{authBean.login}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/homePage.xhtml</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-action>#{authBean.login}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/loginPage.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
是我已经把它放在导航规则,如#{identity.login} – Suraj 2011-05-12 04:44:14
是的,我已经把它放在导航规则,如
In查看你可以使用类似这样的东西,例如:
你使用Seam安全? – 2011-05-11 17:30:33
是iam使用seam安全 – Suraj 2011-05-12 04:43:14