1 Reply Latest reply on Sep 25, 2008 5:17 AM by Stuart Douglas

    always redirecting to home.seam

    Peter Whitmore Newbie

      Hi,


      I use
      JBoss 4.2.2
      seam 2.0.3
      Richfaces 3.2.2


      I have a question regarding the redirect functions in the pages.xml. I could not find a solution in the forums; sorry if it is there.


      What I'd like to achieve is to redirect everything to my main page; this means that if someone enters the name of an existing view in the address bar (eg: http:localhost:8080/myapp/pages/someotherpage.xhtml) the user is automatically redirected to my standard home.seam.


      This should always be the case even if the user is logged in, admin or anything else.


      Is this at all possible?


      I have tried the below page tage in the pages.xml.


           <page view-id="*" login-required="true">
                <navigation>
                     <redirect view-id="/pages/home.xhtml" />
                </navigation>
           </page>




      This will works the first time(ie when the user is not logged in and enters an illegal page) but returns to the illegally entered page as soon as the user is logged in.


      Removing the login-required true didn't help.


      Thanks in advance.


      Peter.