Webdynpro logout button - clear session

Hi ,
     I know this has been asked multiple times, i found many thread on it but none solved my problem.
I need a logout button which cleans up user's session in my application, so that when the user logs in next time, the user is forced to enter the credentials again(login screen).
Current state of applicaiton:
I have created an exit plug , which is triggered when clicking a href button in my application. This works fine as it comes out of the applicaiton into a blank screen.
In the applicaiton node(SICF), i have included the java script code.
<html><body><script language="javascript"> function DelSso2Cookie(sName,sPath) {var sso2Domain = location.hostname;if (location.hostname.indexOf(".")>
0)sso2Domain =location.hostname.substr(location.hostname.indexOf(".")+ 1);p="";if(sPath)p=" path="+sPath+";";document.cookie = sName+"=0; expires=Fri, 31 Dec 1999 23:59:59GMT;"+p + "domain="+sso2Domain+";";}
</script><span style="font-weight:bold;vertical-align:middle"> <br>
You are logged off successfully
<br></span>
<script language="javascript">
try {document.execCommand( 'ClearAuthenticationCache' );} catch (e) {} DelSso2Cookie("MYSAPSSO2","/");
</script>
<body onload = "DelSso2Cookie("MYSAPSSO2","/")">
</body></html>
     The application logs in automatically when i relaunch the application (user not prompted with login screen).
Thanks & regards,
Tashi

Hi Experts,
     The application remains logged in if the browser tab is closed, but the instance window is still open.
It works as expected if the user closes the window completely..As required, It will ask the user to enter the credential on relaunch.
I want the user to be prompted with login screen everytime user logs off with the exit plug.
Thanks & Regards,
Tashi

Similar Messages

  • Logout not clearing session

    Hi,
    I have a secure zone set up and I have a log out button in the menu. The url for the menu link is set to /LogOutProcess.aspx.
    When someone is logged in and they click the logout link they go to a page saying that they have been logged out. However if they then click the Login link in the menu to login, the page that they land on is their dashboard (instead of the login form) so Business Catalyst is not actually logging them out and clearing the session straight away. I went away for about an hour and came back and it was only then that the session seemed to have cleared so that when I clicked the login link, it took me to the login page instead of the dashboard.
    I just wondered if anyone knows the amount of time the session is set for, ie. does this happened for all BC sites?
    Thanks in advance.

    You shouldn't be on the secure domain when you login, but the login form action should point to the secure domain.
    You don't need to be on the secure domain to logout. I was just thinking this problem could be related to the secure domain. Just asking questions.
    Sent from my iPhone

  • The "Logout" button does not appear my Sakai sessions. I have to mouse over the blank area to find the link to logout. The Logout button does appear in Safari. Firefox version 10.0. Mac OS 10.7.2

    The "Logout" button does not appear my Sakai sessions. I have to mouse over the blank area to find the link to logout. The Logout button does appear in Safari. Firefox version 10.0. Mac OS 10.7.2

    To make sure that all required media is in the library contain the project you need to "Consolidate media"  see:  http://help.apple.com/imovie/mac/10.0/#mov882dee351
    You can then copy the library to your laptop with the Finder and open it with the same version of iMovie.  The last phrase is important since Apple has made changes in the project format several times even between minor updates of iMovie 10.  Earlier versions may not be able to read the library and later versions (not possible in this case) may cause the project to be updated so that it is no longer readable by the desktop version.   iMovie on the laptop will not at first find the copied library - you will have either to double click on it or File - Open library - Other and navigate to its location.
    Geoff.

  • How to disable  browser back button after session logout..

    Hi;
    I want to restrict the user to use the back button after session expired or logout. By doing the session expired we are restricting the user to do any new work but I want to restrict the user to see the back pages that he surfed previously in the session.
    Is there any method to disable the browser back button after the session Expired?
    please help me to find out the solution..
    Thanks in advance.
    With Regards,
    Haramohan

    One possible way is automatic return to the current page by writing the following Javascript code to the previous page:
    <script language=JavaScript>
    function backButtonOverride(){
    setTimeout("backButtonOverrideBody()", 1);
    function backButtonOverrideBody(){
    try {
    history.forward();
    } catch (e) {}
    setTimeout("backButtonOverrideBody()", 100);
    </script>
    <%
    catch(Exception e){
    %>
    <jsp:forward page="front.jsp"></jsp:forward>
    <%
    %>

  • How to do a Logout Button in WD for ABAP ?

    Hi all,
    i wonder that i cannot find a logout method somewhere. I have read about an exit plug, but how to fire exitplug of a windwow from the view ?
    And how to do a normal logout button which logs out the user and start the webdynpro application again and go to the login screen ?
    Thx a lot
    Roman

    how to fire exitplug of a windwow from the view ?
    Use Exit Plug in Windows:
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add CLOSE_WINDOW of type wdy_boolean as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont be possible ).
    ->Fire the outbound plug with close_window as X in the onAction of Exit Button .
    Refer SAP online help on using Exit plug to close a window:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm
    method ONACTIONGO_EXIT .
    data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW .
    L_REF_MAIN_WINDOW = WD_THIS->GET_MAIN_WINDOW_CTR( ).
    L_REF_MAIN_WINDOW->FIRE_MY_EXIT_PLUG_PLG( CLOSE_WINDOW = 'X' ).
    endmethod.
    here Main_window is the window which needs to be closed.
    I hope it is clear.

  • Problem designing the logout button i.e. the front end jsp

    Hi,
    my project is an intranet project and starts with the login page. From my login page I am directed to manager, or supervisor, or accountant page where I am needed to perform certain duties. After I am done I need to logout. My problem is that I do not know how to logout and where to place the logout button.
    Will the logout button be on each of the manager, supervisor, accountant page or will it be on the manager page and its sub pages and so on.
    Also I do not know how to configure this button. Should this button be linked to a controller servlet that will destruct the session and redirect the control back to the login page or this follows a different mechanism.
    Do we need to create a frame. Put the logout button on the static side and on ther dynamic side display the pages ie the supervisor, manager, accountant.
    Please help me as I am new to jsp and I am not able to visualize this.

    Hi^^,
    in short: the code you have to send <% session.invalidate(); %> to delete the session -> logout the user. See my example-code:
    //logout.jsp
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>example</title>
    </head>
    <body>
    <% session.invalidate(); %>
    <p> You are now loged out. </p>
    <br><br>
    <form method="post" action="index.jsp">
         <input type="submit" value="Back to mainpage">
    </form>
    </body>
    </html>Save this code into a "logout.jsp" and let it be executed if you want to logout.
    If you have no idea where to put the logout-button:
    I've done it myselb by creating a header.jsp, where I display the log-status and therre is my logout-button:
    //header.jsp
    <div align="right">
    <%
    if (session.getAttribute ("username")!=(null))
              // User is loged in
              out.println ("Welcome, ");
              out.println (session.getAttribute ("username"));
              out.println (".");
              out.println ("<br>");
              out.println ("<a href='logout.jsp'>Logout</a><br>");
              out.println ("-------------------------------------");
              out.println ("<br>");
    else
              // User is guest
              out.println ("Welcome, Guest");
              out.println ("<br>");
              out.println ("-------------------------------------");
              out.println ("<br>");
    %>
    </div>The structure:
    Include this header.jsp into every page you have. use <%@ include file="header.jsp"%>. Hope this is not too confusing ;)

  • How to clear sessions in java while closing the window

    Dear all,
    When I am closing the window if I click 'x' on window how to handle that event in java script , or any other way for this event handling.
    Sudheendra.

    Thank you very much ,
    In my application for each login i am using different sessions.
    In one login if a user navigating then there is no chance of opening different windows.
    So when the user without clicking logout button , if he closes the window by clicking 'x' , then the session allocated for this login is retaining until the session time out.
    so i want to invalidate the session for this particular login .
    Thank you,
    Sudheendra.

  • Help needed with Logout Button

    Hi all,
    I have created a Java faces web application with some of the jsp pages in a protected folder. I am using Tomcat 4.1.24 form based authentication with a memoryRealm. This is all working fine.
    I am now trying to create a logout button. I have created a button with an actionRef that invokes the following method:
    public Action getLogoutAction() {
    return new Action() {
    public String invoke() {
    FacesContext context = FacesContext.getCurrentInstance();
    //Invalidate the session
    HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
    if (session != null) {
    session.invalidate();
    return "logout";
    This works. (I can no longer access the protected pages without re-entering the username and password.) However, rather than returning to the login page, I get a nasty HTTP status 500 error message. The 'root cause' is as follows:
    java.lang.IllegalStateException: getAttribute: Session already invalidated
         at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:954)
         at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:171)
         at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:171)
         at com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:430)
    etc etc....
    I am not sure what this means. Can anyone help?
    Patrick

    Can you supply the rest of the stack trace? The "etc. etc." is what we need to see!
    I believe this is a JSF RI bug - it looks like it doesn't deal with HttpSession invalidation.
    The workaround is to remove the relevant objects from the session instead of invalidating, e.g.:
      FacesContext context = FacesContext.getCurrentInstance();
      context.getExternalContext().getSessionMap().remove("userInfo");
      context.getExternalContext().getSessionMap().remove("otherThing");Or, even better, keep all of the per-session information that you'd need to chuck as child objects on whatever bean implements getLogoutAction(), so you could write:
    public String invoke() {
      this.userInfo = null;
      this.otherThing = null;
    }... which nicely hides any concerns with where or how your logged-in information is stored.
    BTW, as a rule of thumb, calling any of getRequest(), getSession(), or getContext() on ExternalContext should be used a last resort. When you use these methods, you break encapsulation. (OTOH,
    preserving encapsulation isn't more important than getting your application working.)
    -- Adam Winer (EG member)

  • Logout button as rollover

    Hi,
    1.
    I have my logout button specified and want to know if it is possble to create a rollover effect there as well? I want to use it in my Navigation and it would look nicer if it would do rollover as well.
    2.
    Is there a way to specify the page for logout? I want to go back to my main page. And if I use the return button I always get "Page not Found" Error in the Explorer. any workarounds?
    Thanks
    Michael

    Hi Joao try using this code:
    String zAction = null;
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    HttpSession session = (HttpSession)ectx.getSession(true);
    session.invalidate();
    FacesContext context = FacesContext.getCurrentInstance();
    String viewID = "/home.jspx";
    if(viewID!= null){
    UIViewRoot view = context.getApplication().getViewHandler().createView(context, viewID);
    view.setViewId(viewID);
    context.setViewRoot(view);
    Good Luck.

  • Black screen after logout of x2go session

    Hi,
    I have an arch machine with xfce4 I connect to with x2go. Until recently I could just use the xfce logout button to suspend the session, and the main window would close.
    This worked until I did a system update 4 days ago (9 march 2015) where some xfce4 components got updated.
    Now the desktop disappears and becomes a black screen, and according to the log the session is still active. If I suspend the session using the button on the client (or just close the main window) and reconnect again later, I am greeted with a black screen again.
    The only solution then is to terminate the session through the client and reconnect.
    When i execute x2gosuspend-session or x2goterminate-session in a terminal, the session gets suspended/terminated as expected.
    Those 2 commands basically do what I want the log out and shutdown button inside xfce to do.
    relevant update log:
    [2015-03-09 09:26] [PACMAN] Running 'pacman -Syu'
    [2015-03-09 09:26] [PACMAN] synchronizing package lists
    [2015-03-09 09:26] [PACMAN] starting full system upgrade
    [2015-03-09 09:26] [ALPM] transaction started
    [2015-03-09 09:26] [ALPM] removed gtk3-xfce-engine (3.0.1-2)
    [2015-03-09 09:26] [ALPM] removed gtk2-xfce-engine (3.0.1-2)
    [2015-03-09 09:26] [ALPM] upgraded gcc-libs (4.9.2-3 -> 4.9.2-4)
    [2015-03-09 09:26] [ALPM] upgraded elfutils (0.161-2 -> 0.161-3)
    [2015-03-09 09:26] [ALPM] upgraded glib2 (2.42.1-1 -> 2.42.2-1)
    [2015-03-09 09:26] [ALPM] upgraded libxfce4util (4.10.1-2 -> 4.12.1-1)
    [2015-03-09 09:26] [ALPM] upgraded gtk-update-icon-cache (2.24.26-1 -> 2.24.27-1)
    [2015-03-09 09:26] [ALPM] upgraded mesa (10.4.5-1 -> 10.4.6-1)
    [2015-03-09 09:26] [ALPM] upgraded mesa-libgl (10.4.5-1 -> 10.4.6-1)
    [2015-03-09 09:26] [ALPM] upgraded gtk2 (2.24.26-1 -> 2.24.27-1)
    [2015-03-09 09:26] [ALPM] upgraded xfconf (4.10.0-4 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded libproxy (0.4.11-4 -> 0.4.11-5)
    [2015-03-09 09:26] [ALPM] upgraded libxfce4ui (4.10.0-2 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded exo (0.10.2-3 -> 0.10.3-2)
    [2015-03-09 09:26] [ALPM] upgraded firefox (36.0-1 -> 36.0.1-1)
    [2015-03-09 09:26] [ALPM] upgraded garcon (0.2.1-1 -> 0.4.0-1)
    [2015-03-09 09:26] [ALPM] upgraded libmpc (1.0.2-2 -> 1.0.3-1)
    [2015-03-09 09:26] [ALPM] upgraded gcc (4.9.2-3 -> 4.9.2-4)
    [2015-03-09 09:26] [ALPM] upgraded gcc-fortran (4.9.2-3 -> 4.9.2-4)
    [2015-03-09 09:26] [ALPM] upgraded git (2.3.1-1 -> 2.3.2-1)
    [2015-03-09 09:26] [ALPM] upgraded grep (2.21-1 -> 2.21-2)
    [2015-03-09 09:26] [ALPM] installed gtk-xfce-engine (2.10.1-1)
    [2015-03-09 09:26] [ALPM] upgraded libplist (1.11-1 -> 1.12-1)
    [2015-03-09 09:26] [ALPM] upgraded libusbmuxd (1.0.9-1 -> 1.0.10-1)
    [2015-03-09 09:26] [ALPM] upgraded libimobiledevice (1.1.7-1 -> 1.2.0-1)
    [2015-03-09 09:26] [ALPM] upgraded librsvg (1:2.40.6-1 -> 1:2.40.8-1)
    [2015-03-09 09:26] [ALPM] upgraded libtool (2.4.5-1 -> 2.4.6-1)
    [2015-03-09 09:26] [ALPM] upgraded man-pages (3.80-1 -> 3.81-1)
    [2015-03-09 09:26] [ALPM] upgraded thunar (1.6.5-1 -> 1.6.6-1)
    [2015-03-09 09:26] [ALPM] upgraded thunar-volman (0.8.0-2 -> 0.8.1-1)
    [2015-03-09 09:26] [ALPM] upgraded upower (0.99.2-1 -> 0.99.2-2)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-appfinder (4.10.1-1 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-panel (4.10.1-2 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-mixer (4.11.0-1 -> 4.11.0-2)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-power-manager (1.4.2-2 -> 1.4.3-1)
    [2015-03-09 09:26] [ALPM] installed polkit-gnome (0.105-2)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-session (4.10.1-5 -> 4.12.0-2)
    [2015-03-09 09:26] [ALPM] installed cantarell-fonts (0.0.16-2)
    [2015-03-09 09:26] [ALPM] installed ttf-dejavu (2.34-2)
    [2015-03-09 09:26] [ALPM] installed gnome-themes-standard (3.14.2.3-1)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-settings (4.10.1-1 -> 4.12.0-3)
    [2015-03-09 09:26] [ALPM] upgraded xfce4-terminal (0.6.3-1 -> 0.6.3-2)
    [2015-03-09 09:26] [ALPM] upgraded xfdesktop (4.10.3-2 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded xfwm4 (4.10.1-1 -> 4.12.0-1)
    [2015-03-09 09:26] [ALPM] upgraded xterm (314-1 -> 316-1)
    [2015-03-09 09:26] [ALPM] transaction completed
    Does anyone know how I can restore previous behavior?
    Thanks

    As a workaround, you can create the file " /usr/local/bin/xfce4-session" with this content:
    #!/bin/bash
    /usr/bin/xfce4-session
    killall -q x2goagent || true
    Don't forget to make the file executable.
    Not pretty at all, but works for now.

  • App needs a logout button

    The My Verizon mobile app needs a logout button. The only ways to logout are to force quite the app or reset your phone.  If you don't do that, the next time you open the app, it complains that your session has timed out.

    thomprodforum wrote:
    Thanks, Spiral. I am using an iPhone5 with iOS 6 and the latest version of the My Verizon mobile app. There is no logout button.
    Yea, the Android app does not have a logout button either but I am not having the 'timed out' error you are getting on the your iOS version. 
    Sounds like Verizon needs an update to correct the timeout problem and/or add your logout button to the iOS app.  In the meantime, I would just continue to close the app (force quit) after use.  I know it is a pain, but I found on my iPhone 4 (iOS 5)that having to many apps 'open' was not good either so I would always try to quit as many as possible.
    Good luck.

  • Logout button in Solution Manager Workcenter

    Hi,
    We are configuring Solman workcenter. There, we didn't found any LOGOUT button.
    Because of this if we login by one user and closes the browser to close workcenter, the session is not automatically killed but rather when we again hit the same workcenter link in the browser it opens with the previous user session only.
    Has anyone came across this??

    Hello sir Kumar,
    i'am on the same way as you, some days ago i found that note:
    1644898 - Solution Manager: How to change page when log off from CRM_UI
    the title is related to CRm but inside documentation you can see that the afected component is "SV-SMG-SUP Service Desk / Incident Management".
    i can't find time for try that correction but is only way that i found to standard management on logoff from workcenters.
    if i get more information when i find time to test on my systems i will update that forum.
    regards:
    Luis

  • Not able to clear session of web application running inside wpf browser control

    Hi,
    I have used below code to clear session of web application running inside wpf browser control .   
    [DllImport("wininet.dll", SetLastError = true)]
       private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);
     InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
    This code is working in Windows 8 but it is not working in windows 7 and windows 8.1.
    I want to know why it is not working and how to make it work in windows 7 and windows 8.1
    Please help.
    Thanks & Regards,
    Pritesh

    Hi,
    I have used below code to clear session of web application running inside wpf browser control .   
    [DllImport("wininet.dll", SetLastError = true)]
       private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);
    InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
    This code is working in Windows 8 but it is not working in windows 7 and windows 8.1.
    I want to know why it is not working and how to make it work in windows 7 and windows 8.1
    Please help.
    Thanks & Regards,
    Pritesh

  • WebDynpro ActiveX  Button in Interactive form- not working in IE

    Hi,
    1)     I am working with Interactive forms in WebDynpro. When I deploy the application, the PDF form is opens in a browser window, But the WebDynpro ActiveX button ( to call a method in view Controller) is not working.
      When I copy the URL and try in another sysetm, its working.
      I hope the probelem is with the browser settings.
    2) And also, the 'https' URLs does not work properly in my IE.
    Can you give me a solution for these problems?
    Thanks,
    Prabhakar.

    Hi Prabhakar,
    I doubt this is anything to do with the browser. Please let me know if you have already installed SAP Active Control Framework on your desktop.
    I think this might be an issue. Also check for Adobe Reader version in both the machine.
    Cheers
    Satya

  • [WAD] Logoff / Logout button in web report

    Dear all,
    Is it possible to put a Logoff/Logout button (or link) in web report? Pls. share your experinces.
    regards
    atlaj

    Hi Atlaj,
    This is what i did..
    <A href="<SAP_BW_URL CMD="LOG_OFF" REDIRECT_URL="The URL you want the page to be redirect after the logoff">"><FONT color=#0000ff size=1>LogOff</FONT></A>
    Hope it helps!

Maybe you are looking for

  • EHP6 Upgrade - MAIN_SHDRUN/DDIC_UPG

    Hello, I am performing EHP6 upgrade and I am kinda stuck in pre-processing phase. I am getting the following error message.        Last error code set: RFC login to system SID ashost ip nr 06 gwhost host gwservice sapgw06 failed with code 1 key RFC_C

  • Invalid Object error in Stored Procedure

     Royal Thomas

  • HT1688 iPhone 5 baked, any hope or is it hopeless?

    I have a 16g  iPhone 5.  I've been having horrible battery life.  A full battery lasts me litteraly 6hrs.  I try to keep all settings to minimum as well as follow all the tips everyone suggests regarding battery convservation/consumption.  Still noth

  • Imac SuperDrive USB extension power

    I have a late 2013 imac, and a USB SuperDrive. I want my SuperDrive to be permanently plugged into the imac, but not as close as I have to have it, with the short wire it unfortunately has. I thought a USB extension would be ok. But, I now realise an

  • Oracle9i JDeveloper Beta Release Notes Adendum

    How can i do the balancing of DFD using oracle designer 2.1. How can i record business rules and business logic in designer and where?