Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      None

      Description

      Tapestry lacks good support for quite commonly needed log out action.
      As described here :
      http://wiki.apache.org/jakarta-tapestry/FrequentlyAskedQuestions/LogoutLink
      there are currently 2 ways to achieve logging out - utilizing RestartService, or hacking inside Listener methods. Neither is sufficient - shortcomings of RestartService and ServiceLink are described, and listener method way is a hack utilizing some pieces of code that should normally be hidden from user. Let alone mentioning that later case doesn't work always - application can get into some strange states raising
      java.lang.IllegalStateException: Session already invalidated
      exceptions.
      It should be great if there was something easily accessible and intuitive as IEngine.restart() to be used for this purpose.

        Activity

        Hide
        Konstantin Ignatyev added a comment -

        I would say there is 3rd way and it works well for me: link to logoff.jsp that looks like this:
        <%
        session.invalidate();
        response.sendRedirect( "app");
        %>

        Link:
        <a href="logoff.jsp" class="menu" jwcid="logoff" >Log Off</a>

        Component:
        <component id="logoff" type="Any">
        <binding name="href" expression="page.engine.contextPath + '/logoff.jsp'"/>
        </component>

        Show
        Konstantin Ignatyev added a comment - I would say there is 3rd way and it works well for me: link to logoff.jsp that looks like this: <% session.invalidate(); response.sendRedirect( "app"); %> Link: <a href="logoff.jsp" class="menu" jwcid="logoff" >Log Off</a> Component: <component id="logoff" type="Any"> <binding name="href" expression="page.engine.contextPath + '/logoff.jsp'"/> </component>
        Hide
        Jesse Kuhnert added a comment -

        Unless I'm reading incorrectly it seems like these problems have mostly gone away as per http://wiki.apache.org/tapestry/LogoutLinkTap4 .

        If not I'll re-open.

        Show
        Jesse Kuhnert added a comment - Unless I'm reading incorrectly it seems like these problems have mostly gone away as per http://wiki.apache.org/tapestry/LogoutLinkTap4 . If not I'll re-open.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Vjeran Marcinko
          • Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development