1 Reply Latest reply on Jul 9, 2007 11:43 AM by Pedro Mota

    Redirection to login page if not logged in

    Pedro Mota Newbie

      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?