How to force logoff a session???

As i can put any jsp script in my application i want to know that if there is any way so that i can recognize a session that is alive by some sessionID() thing.
I want single signON system so if someone try forcefully to use same ID to login with correct password the other one which is already logged in should be logged out automatically
but for that i should know somehow that this is the ID of this alive session and it should be invalidate....
I know that i can get session.getID() to get the ID of the present session which is i am using but can I have the information of other session those are alive in my application by some method so that i can forcefully do anything with them....
Administrate the users Login and Logoff....

You may find HttpSessionListener useful. On create or destroy of every session just maintain a static backing map -or so- with all relevant details about the session and the logged-in user. During login you can crawl in this map for the same username and then invoke a HttpSession#invalidate() on this session.

Similar Messages

  • How to Force Logoff from Portal in Custom Application

    Hi All,
    We have developed a Custom Component for the user to change password in Portal 7.3. As per the requirement ,after changing the password the portal should force logoff without further execution. We are able to change the password but not able to force a logoff . Any suggestions how this can be achieved.
    Regards,
    Srinivas
    Edited by: Nivas209 on Feb 17, 2012 10:23 AM

    Hi Detlev,
    I am using the below link , for session termination and Force Log-off.
    http://help.sap.com/saphelp_nw73/helpdata/en/19/667bae77684887bea80129800fd701/frameset.htm
    I am able to force a log off, but the desktop inner page only gets logged out.The Masthead and Top level remains the same(Not Logged Off) .
    If i do a refresh in my browser everything gets logged off and Login screen appears.Now how can i do a browser refresh/reload in that script.
    I tried with few things it doesn't work. Please suggest on this.
    Regards,
    Nivas209

  • Is there a way to force a new session so my "on new session" code will run?

    I'm using apex.oracle.com and I find values of application (global) and page items persisting across logins.
    I didn't expect that? I thought they would go away when I logged out of APEX. But I can change the values, logout, and log back in to the same values. And when I login and start an application, it's not running my "shared components > application processes" initialization code which is set "on new session".
    I thought each login would be a distinct new session with it's distinct set of items. (see definition below)
    So when I run an application, is there a way to force a new session so my "on new session" code will run?
    >
    What Is a Session?
    A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned a unique identifier. The Application Express engine uses this identifier (or session ID) to store and retrieve an application's working set of data (or session state) before and after each page view.
    Because sessions are entirely independent of one another, any number of sessions can exist in the database at the same time. Also, because sessions persist in the database until purged by an administrator, a user can return to an old session and continue running an application long after first launching it. A user can also run multiple instances of an application simultaneously in different browser sessions.
    Sessions are logically and physically distinct from Oracle database sessions used to service page requests. A user runs an application in a single Oracle Application Express session from log in to log out with a typical duration measured in minutes or hours. Each page requested during that session results in the Application Express engine creating or reusing an Oracle database session to access database resources. Often these database sessions last just a fraction of a second.
    >
    Thanks -- Howard

    I cleaned up the copy of the Select List code in APEX 4.1.xxx which was not operating correctly before. Now it matches what I have in APEX 4.2.yyyy. And, drum roll please, the select list seemingly works fine there (4.1) as well. But now, the initialization code--which was working fine(!)--FAILS in 4.1!
    <font size="3"><font color="red">•<font face="courier new">
    Okay. Maybe this will help. 1) I logged in. Ran the login page but did not login. Opened the "session" window and wrote down the session ID. Logged out and back in. 2) Ran the login page but did not login. Opened the "session" window and .... it has the same session ID? 3) <b>So the session is persisting across logins!! How is that possible?</b>
    (More) When I log into 3 different applications, I get a different session ID for each but repeated logins always give the same session ID for any given session. </font>

  • Using Unix Command Line to force logoff of other users

    Hello - I am the administrator for my family's Mac (OS X - 10.4.8). Four of us in the family share the system. Frequently, my family members forget to logoff. I would like to be able to force them off via the Unix command line. Can't I sign on as root and execute a "forced logoff" type of command?

    Thanks to Mihalis and Jarik for the additional info.
    I'm back now with a question. I have a user named "visitor" logged on. I issued a killall command which killed all the users processes except one. Using /Applications/Activity Monitor.app, I can see the process is "loginwindow" and it is owned by visitor.
    However,
    ps -u visitor
    reveals no running processes. Assuming I only had command-line access (no GUI to use Activity Monitor.app) and had multiple users logged in, how can I discover which loginwindow PID belongs to visitor?
    msq
    EDIT: I went ahead and sudo kill PID the loginwindow process owned by visitor and realized that
    ps -axj | grep visitor
    worked to reveal the loginwindow process owned by visitor. But when I logged visitor in (Fast User Switching) and ran sudo killall the Activity Monitor.app identifies the loginwindow as being owned by root but ps -axj | grep visitor shows the process belonging to visitor.
    Something weird in the depths of Leopard's UNIX land, but I think I can find my way around now.
    Thanks, everyone.
    Message was edited by: mistersquid

  • How to check if "create session" is being audited in the aud$

    Specifically, how do the determine if "create session" is being audited? Assume audit_trail=db_extended, audit_sys_operations=true and audit_file_dest has been set. Please specifically how to check if "create session" is being audited. Thanks

    SQL> connect test/test
    Connected.
    SQL> connect / as sysdba
    Connected.
    SQL> select username, action_name, to_char(timestamp,'DD/MON HH24:MI') from dba_audit_trail where action_name like 'LOG%';
    USERNAME                       ACTION_NAME                  TO_CHAR(TIMESTAMP,'DD/MONHH24
    TEST                           LOGON                        10/JANV. 19:32
    TEST                           LOGOFF                       10/JANV. 19:32
    SQL> select to_char(sysdate,'DD/MON HH24:MI') from dual;
    TO_CHAR(SYSDATE,'DD/MONHH24:M
    10/JANV. 19:33

  • Force end of session when user closes window without logging out

    I want to protect sensitive employee data. Does anyone know how to force a user's portal session to be terminated after a user closes a window with the "X" instead of logging out?

    Web application is connectionless. So there is no way to tell if a user has disconnected. If the user diligently logout, then invalidating a session is no problem. However, if you wish to invalidate the user upon closing of window, I suggest you drop that idea and change to different approach.
    1. If you are trying to impose single logon policy, you may consider invalidate an existing session if the same user login again.
    2. If you really need to invalidate a user session as soon as he is inactive (or closes window). I suggest you set a very small timeout interval (maybe 3 minutes). Then for all the pages, implement a simple invisible IFRAME that will keep refreshing itself (say every 2 minutes) on a dummy JSP/servlet URL. The fact that this IFRAME always hit the URL at 2 mins interval will keep the user session valid. Once the browser window is closed, the session will be invalidated in max 3 mins time.
    The final suggestion is to drop that idea altogether, the point is ... implement such feature is like twisting web application to do something that it is not design to do naturally.

  • How to force refresh of data through browser or PDF?

    We have the dashboard set to refresh every minute.  We are pulling the data using XML from DB.  When we are in browser and clear the browser cache and then reload the .swf... the data is updated.  We haven't been able to figure out how to force the cache-clear and data refresh with either swf or pdf.
    Your help is greatly appreciated.

    Hi Jeff,
    Is the XML coming from a web page or a web server?
    If yes then you can give this a go. To stop the caching mark your web page with extra tags to say it has expired.
    HTML page example:
    <HEAD>
        < META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
        < META HTTP-EQUIV="EXPIRES" CONTENT="0" />
    </HEAD>
    JSP example:
    <%
      // Stop Internet Explorer from caching the results of this page.
      // We do this so that every time Xcelsius calls this page it see the latest results.
      response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
      response.setHeader("Pragma","no-cache"); //HTTP 1.0
      response.setDateHeader ("Expires", 0); //prevents caching at the proxy server 
    %>
    Regards,
    Matt

  • How to share the same session between JNLP Application and browser session

    How to share the same session between JNLP Application and browser session using BasicService.showDocument(url) method? It appears whenever i launch any URL from within a JNLP application using BasicService.showDocument(url) , it creates new instance of browser and session even after i used cooke handlers to restore JSESSIONID and Ltpa token etc.
    public static int showDocument(String urlToOpen)
    BasicService obj = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
    obj.showDocument(urlToOpen);
    }

    Try using Reflection

  • How to delete the redundant sessions in Maintenance Optimizer?

    Hi experts,
    As it said in title, how to delete the expired sessions as the screenshot below in Maintenance Optimizer and keep SAP Solution Manager clean?
    Thank you in advance.
    Best Regards,
    Pany

    Hello,
    Check here Deleting existing maintenance optimizer transactions
    Please  refer to the note 845433 , with the report CRM_ORDER_DELETE  and transaction type SLMO,you can delete those maintenance optimizer, hope this help to you
    BR,
    K.

  • How do I create a session?

    In order to use methods like getValidSessions() in the Session class of the SessionAPI for iPlanet Portal Server, I need a Session object. There is no obvious way to construct one based on the javadocs. I can get one from a SessionID object, but in order to create a SessionID object, I need a HTTP request or an encrypted string, i.e. SessionID( String sid ). How can I create a Session object, or how can I create a SessionID object (which will allow me to get a Session object)? Any help is much appreciated. NOTE: I'm building a plain Java utility to use the Portal Server API to retrieve session and profile information, and I'm not implementing it as a servlet.

    From com.iplanet.portalserver.providers.ProviderAdapater use the getSession() method whish returns com.iplanet.portalserver.session.Session object
    Then from Session class use the method getValidSessions()method

  • How to force a new password in portal with LDAP user? external users

    With an external portal (used by agents that do not work for you or reside in your office), company policy is for password to be changed every qtr.
    If the users are creating as LDAP users how to force them to change their password when required?
    Is this a custom application that needs to be written so when they log into the portal if the qtr has expired the portal ask them to enter a new password that becomes valid for the next qtr.
    Versus internally deleting and emailing all the users a new password?

    Hi Glenn,
    We are getting one problem when we are creating user in LDAP and login with that user in  Portal that time we are getting Password change screen , but when we create a user in LDAP and change the password of that user in LDAP then when the user tries to  Login to portal that time we are not able to see the password change screen.
    But again if we change the password of that user through Portal we are able to see change password screen.
    can you help on this how we can force the user to change password when we are changing password in LDAP or in SAP System.
    Regards
    Trilochan

  • How to force the "Bluetooth Communicat​ions Port" to be one of COM1 to COM8 ports?

    Dear Lenovo Community, Happy Holidays to you all and wish you a great happy new year. Recently purchased a Bluetooth OBDII device and have difficulty making it to work with its provided software on my T61 (running original XP Home). My short story and question/problem is that I can open "My Bluetooth Places" and pair with the OBDII device as an "OBDII SPP Dev", but my T61 assigns serial port COM19 to it. The OBDII software which came with the device only can let user set to one of the COM1 to COM8 ports and in the properties of Bluetooth pairing, there is no way that I can select which COM port to use. I looked at the Device Manager and I do see these COM port assignments: COM4,5,6,7: Sierra Wireless (the HSDA modem in the laptop which I have never used BTW) COM 9,10,11,12,13,14,15,16,17: Bluetooth Serial Port COM 18, 19: Bluetooth Communications Port and I don't see anything for COM1,2,3, and 8 My question is how to force the computer/OS to assign one of the COM1 to COM8 ports to my device upon pairing? Can I disable the Sierra Wireless model from the COM ports list and hope this will happen? Thanks for your help and inputs beforehand. Regards, AL

    Hi, AL_K
    Have you attempted to change the port number in device manager itself? If you navigate to Device Manager and open the list of Ports, you can right-click on the device you wish to assign a different port number. After right-clicking, click Properties. There should be a tab called Port Settings. In here, you should find a setting to manually assign a port number.
    Good luck, and let me know how it goes,
    Adam
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it.

  • How can I set a Session bean timeout

    Hello !
    How can I set a Session bean to time out eg. 48 hours ?
    Thanks
    Uiloq Slettemark

    For stateful session beans you can use the timeout attribute in the orion-ejb-jar e.g.
    <session-deployment timeout=1800 ..>
    this is specified in seconds and Default Value: 30 (minutes)
    regards
    Debu

  • How to create a new session in JSP file

    Usually a child IE window uses same session with parent window. Dose someone know how to create a new session when creating a new IE window by clicking a URL in parent window? The web page is writen by jsp file.

    I am not sure of your question. Are you wanting to have 2 Session objects (one for the parent window and another for the child)?
    A session is usually created once per client and is stored on the server the session id is carried around in a cookie or a URL rewrite so that everytime the user submits a page you will be able to store/access information.
    // this will create a new session object if one doesn't already exist.
    HttpServletRequest.getSession( true );
    Hope this helps

  • Adobe Acrobat 9 Standard is still seeing my old scanner install.  How to force it to see new scanner install.

    Adobe Acrobat 9 Standard is still seeing my old scanner install.  How to force it to see new scanner install?  Scanner is recognized by and works fine in Windows.  Acrobat however still sees Fujitsu fi-6130dj #3.  I need it to see Fujitsu fi-6130dj which is what is listed in Device Manager.  (Windows XP SP3).
    Thank you for any suggestions.

    To provide more detail and list what was done to resolve the issue but there may be a better way.
    Background.  When you install a USB device to a PC it is listed in Windows Device Manager as installed hardware.  If you take the USB plug for any device and plug it into a different USB port on the PC the PC will install drivers again for that device.  In Device Manager, if you set a system environment variable for device manager to show non-present devices you can see all of the times this may have occurred.  In this specific instance there were five installations in Device Manager for one piece of hardware, a Fujitsu fi-6130 scanner.  The first listing was Fujitsu fi-6130dj, then Fujitsu fi-6130dj #2, Fujitsu fi-6130dj #3 and so on.  Adobe Acrobat only saw the third instance of these drivers being installed.  Once I cleaned Device Manager of all Fujitsu scanner installs I was able to have a single set of drivers installed for this Fujitsu but Adobe still recognized the third instance of the driver install and I could not figure out how to force it to see what Device Manager was seeing, a single instance of the scanner being installed (with no #3 behind it).
    Steps performed to try to resolve.
    Repair install of Adobe - no luck - still sees the #3 instance of the scanner
    Deactivation, uninstall, reboot, reinstall, reactivation of Adobe - no luck, same behavior as above
    Complete removal of all scanner related software.  This included the ISIS drivers in Add/Remove Programs and all other related software.  This also included deleting the contents of the TWAIN_32 directory found within the root of the Windows directory and also included deleting the scanner from Device Manager.
    Rebooted.
    Reinstalled complete packages of both TWAIN and ISIS scanners - with the scanner disconnected.  Powered the scanner back on and let Windows install the drivers for the hardware.  Only at this point did Adobe see the new install of the Fujitsu scanner and no longer looked for the #3 instance of that scanner install.

Maybe you are looking for

  • Male to male iphone audio cable with volume

    Has anybody found a good quality male-male audio cable with volume control?  This is for an iPhone 5

  • Data retrieval failed

    Greetings all, i'm having a problem in order to retrieve data from oracle 10g views. Notes: Data retrieval from other tables are just fine. Some views are created for me in order to share some data from other databases. As far as i concern, we actual

  • Export using a cronjob won't work

    Hello, I am using RHEL4 and oracle. I am trying to set a cronjob that'll make a schema export. The file I edited is under /home and it's called export.sh. When I run it manually (./export.sh )as the oracle user, it runs without problem. When I set cr

  • Persisting a session even when the browser is closed

    i want to persist a user session even when the browser is closed. How to do it through cookies. I know i define a cookie, set its max age and then put that in response. But its not working. I am using I.E

  • Issues while processing the BOMs using fm ''CSAP_MAT_BOM_MAINTAIN'

    Hi Group, we are facing issues while processing the BOMs using the basic type(Z-idoc type) for standard type BOMMAT04. thing is that the segment 'E1STPOM' is defined to contain 1 to 99999 records in it. when an Idoc is run(say with 150/200 segments o