Jahia in English > How can I return...

0 (0 Good)
0 (0 Bad)

How can I return to start context when logging out?

by  nickp »  2013/03/27 16:08

When logging out of jahia (6.6.1) it seems jahia redirects you to the default web project home page.  I have a test environment which I do not want to publish, but when I log out I get a 404 page because the project is not published.  How can configure jahia to return to the /start context login page when logging out instead of looking for the default (unpublished) web project home page?

  • How can I return to start context when logging out?
    2013/03/27 16:08

    nickp <p> When logging out of jahia (6.6.1) it seems jahia redirects you to the default web project home page. &nbsp;I have a test environment which I do not want to publish, but when I log out I get a 404 page because the project is not published.&nbsp; How can configure jahia to return to the /start context login page when logging out instead of looking for the default (unpublished) web project home page?</p>

  • Number of messages  8
    Registration date Mar 27, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: How can I return to start context when logging out?

    by  shuber »  2013/03/28 07:31

    Adding a ?redirect=URL parameter to the logout action call should do what you need.

    Best regards,

      Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: How can I return to start context when logging out?

    by  nickp »  2013/03/28 21:59

    Thanks, Serge.  That looks like it should work.  I'm just new enough to Jahia I'm not sure where to make that change.  I'm not sure if its in a jsp file somewhere, or an xml file, or via the UI, or....  Can you offer anymore help?

  • Re: Re: How can I return to start context when logging out?
    2013/03/28 21:59

    nickp <p> Thanks, Serge.&nbsp; That looks like it should work.&nbsp; I&#39;m just new enough to Jahia I&#39;m not sure where to make that change.&nbsp; I&#39;m not sure if its in a jsp file somewhere, or an xml file, or via the UI, or....&nbsp; Can you offer anymore help?</p>

  • Number of messages  8
    Registration date Mar 28, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: How can I return to start context when logging out?

    by  shuber »  2013/03/29 08:02

    Hello Nick,

    You could probably simply override the default logout.jsp file by putting a modified copy of it in the 

    jnt_logout/html/logout.jsp directory.

    The original file is in the default module.

    Best regards,

      Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: How can I return to start context when logging out?

    by  nickp »  2013/04/04 21:52

    Thanks, Serge.  Adding ?redirect=/start to the logout.jsp page worked for the My Space Logout link.  Now I need to change the Logout menuitem in the Editor/Contributor top nav, so it also returns you to the /start context when logging out of Editor/Contributor mode.

  • Re: Re: Re: Re: How can I return to start context when logging out?
    2013/04/04 21:53

    nickp <p> Thanks, Serge.&nbsp; Adding ?redirect=/start to the logout.jsp page worked for the My Space Logout link.&nbsp; Now I need to change the Logout menuitem in the Editor/Contributor top nav, so it also returns you to the /start context when logging out of Editor/Contributor mode.</p>

  • Number of messages  8
    Registration date Apr 4, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Re: How can I return to start context when logging out?

    by  faissah »  2013/04/05 20:49

    Hello Nick,

    In order to change this redirection, you will have to customize the spring bean "Toolbar.Item.Logout".

    In order to do so:

    • extract the file applicationcontext-toolbar.xml from /tomcat/webapps/ROOT/WEB-INF/lib/jahia-impl-XXXX-SNAPSHOT.jar
    • customize the bean "Toolbar.Item.Logout" by changing the redirect param. In your case <property name="value" value="$context/cms/logout?redirect=/start"/>
    • place your custom applicationcontext-toolbar.xml in the folder /tomcat/webapps/ROOT/WEB-INF/etc/spring
    • restart your jahia

    Hope this helps!

    Regards,

    Fabrice

     

    Fabrice  (faissah)

    Number of messages  264
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Re: Re: How can I return to start context when logging out?

    by  nickp »  2013/04/08 15:15

    Perfect.  And thank you Fabrice!  It works just like you described.  I learned a lot about Jahia architecture from this little excercise.  And the solution to the logout redirect will help my team moving forward.  Thanks again!

  • Re: Re: Re: Re: Re: Re: How can I return to start context when logging out?
    2013/04/08 15:15

    nickp <p> Perfect.&nbsp; And thank you Fabrice!&nbsp; It works just like you described.&nbsp; I learned a lot about Jahia architecture from this little excercise.&nbsp; And the solution to the logout redirect will help my team moving forward.&nbsp; Thanks again!</p>

  • Number of messages  8
    Registration date Apr 8, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page