1 Reply Latest reply on Apr 25, 2008 6:13 PM by jpviragine.jpviragine.gmail.com

    Seam redirect after login

    jakubhertyk

      Hello,


      I have a simple question (I hope).  The login page for our site is login.xhtml, which is rendered to the user as login.seam.  This works fine with the Authenticator session bean.  After login, I need seam to redirect to a home.jsp, so I changed login.page.xml to:



      <navigation from-action="#{identity.login}">
           <rule if="#{identity.loggedIn}">
                <redirect view-id="/home.jsp"/>
           </rule>
      </navigation>
      



      When the user hits the login.seam page, it's fine, but after login they get redirected to home.seam, not home.jsp.  Is there a way to set the view-id so that the extension doesn't the altered?


      Thanks,


      Jakub

        • 1. Re: Seam redirect after login
          jpviragine.jpviragine.gmail.com

          AFAIK NO!


          But you can use a dirty workaround:


          Create a home.xhtml redirecting to a home.jsp


          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <meta http-equiv="Refresh" content="0; URL=home.jsp"/>
          </head>
          </html>




          Cheers