3 Replies Latest reply on Mar 1, 2010 3:45 AM by cbensemann

    Logout completely


      When using the template code in seam:



      <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}" propagation="none"/>





      it did logout, but the url address in browser:


      My Link


      when we login in in the URL, we cannot login in again.
      error message: Something bad happened :-( Your session has timed out, please try again


      Can logout jump out completely?


      Thanks advance




        • 1. Re: Logout completely
          germanescobar

          Yes, it is a problem. As a workaround, I've created a logout.xhtml page with a single line that redirects the user to the home page:




          <meta http-equiv="Refresh" content="0; URL=./home.seam" />





          So, my logout link looks like this:




          <s:link view="/logout.xhtml" action="#{identity.logout}" value="Logout" ... />



          • 2. Re: Logout completely

            bingle! it works! Thanks!

            • 3. Re: Logout completely
              cbensemann

              I use a navigation rule in pages.xml to achieve the same thing.


              <page view-id="*" scheme="http">
                   <navigation from-action="#{identity.logout}">
                       <redirect view-id="/home.xhtml" />
                   </navigation>
              </page>



              which basically says from any page (*) whenever we return from identity.logout redirect to /home.xhml


              Either option should work for you. Just thought I would share a different way of doing the same thing. This approach also does not require the round trip back to the users browser for redirect.