Redirecting on logoff

When a user logs off from Cognos he gets to a “You are logged off” note with the option to log back in. Sometimes it is preferable to have the log off screen automatically redirect the user.

The file that controls the log off screen is found at ../templates/ps/portal/logoff.xts.

I highly recommend using an XML editor such as Notepad++ for making modifications to these files.

In this file search for the string <!– Standard meta tags –> (it should be on or around row 105). Paste <meta HTTP-EQUIV=”refresh” content=”2;url=”/> directly below that. Save and close.

It should look like:

<!– Standard meta tags –>
<meta HTTP-EQUIV=”refresh” content=”2;url=”/>

Before you can restart Cognos you will need to remove the portal.jar from ../webapps/p2pd/WEB-INF/lib/. The easiest way is to simply rename it to portal.jar.bak. This file contains many of the XTS files. Cognos will default to using the files in that JAR before the ones in the templates folder.

With the portal.jar file removed, restart Cognos. Log in, then log back out. If all goes well you should be redirected to google in 2 seconds.


10 Responses to Redirecting on logoff

  1. avi says:

    Hello paul i’m trying to redirect the log off page to a custom page that i have designed
    how do i make it work ..?

  2. avi says:

    I found the solution thank u anyways 🙂

  3. Nanno says:


    When I try above solution, I get PRS-OBJ-0617 The object “/portal/logoff.xts” could not be created…. after click on logoff link.

    @Avi: Can you share your solution?



  4. Avi says:

    This is wot i had documented:
    1) create the html file to which you want to redirect the user after he logs off.
    Like for example:
    2) Copy the html page and paste it in the following location : \c10\webcontent\samples
    3) Now Goto Report Studio and create a new report. Goto toolbox and drag and drop the Hyperlink tool.
    4) Now goto the hyperlink properties and in Url Source , url give the path of the html page.
    5) Run the report

    Copy the url path on the viewer.

    6) Now navigate to : \c10\templates\ps \system.xml
    Search for “custom auth “ and make log off enambled = true
    Bellow is the fragment where the changes is to be made


    Paste the url path that you copied on step 5 and paste it here.
    The above code fragment shows this in bold.
    7) Then save the file and restart cognos.
    8) Now when you log in and log out you will be redirected to the custom page

  5. Nanno says:

    OK, you exaplanation is clear. Only your example file is not included.

    In my case I have to redirect the user to the main page of the intranet site of the company.

    I found some more examples on the internet but they are not working. One example is with SDK, and we don’t have that.

    I found in the portal.jar that the logoff.xts also exists. But this file works with parameters so it is not clear where to “tune”.

    When I rename the protal.jar to portal.jar.bak and I restart cognos, I get the error mentioned before. It looks like the logoff.xts is not found a that moment.

    Any more suggestions would be appreciated.



    • Avi says:

      Ok so u want to redirect to the company main page right..
      so heres wot u do..
      navigate to : \c10\templates\ps \system.xml
      Search for “custom auth “ and make log off enambled = true
      Bellow is the fragment where the changes is to be made

      “copy the link of the main page and paste it here”

      restart cognos!
      hope this helps.

  6. Avi says:

    well i cant type the code too.. so if u find the tag logoff enabeled =true, and inside the tag redirect-url copy-paste the link of the company site home page.

  7. Swetab says:

    Hi Paul,
    Using system.xml at /c10/templates/ps and the custom-auth section, I was able to redirect users to a url, as such:

    BUT, this only works when users click on the logoff link. I want the same redirection if the session timesout too. Right now, if the session timesout the users are taken to the cognos login page.
    Any thoughts?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: