[jboss-user] [JBoss Seam] - Redirection to login page if not logged in

pippin1966 do-not-reply at jboss.com
Mon Jul 9 11:29:20 EDT 2007


Hi,

I'm trying to change the redirection that Seam does when you are not logged in.

(1) I have defined this in pages.xml

    <page view-id="/admin/*">
  |     	<restrict>#{s:hasRole('admin')}</restrict>
  |     </page>

(2) In the header of pages.xml

<pages xmlns="http://jboss.com/products/seam/pages"
  |        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |        xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
  |        no-conversation-view-id="/home.xhtml"
  |        login-view-id="/home.xhtml">

But when I try to access a page under /admin I get a 404 error because it is trying to access this page: login.seam (and it doesn't exist in the project) but I have defined my login page as home.seam

What am I doing wrong?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062039#4062039

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062039



More information about the jboss-user mailing list