How to know when a session has gone by closing browser or leaving site.

Hi! I'm doing an application that uses the session API. This application must run in every java-enabled web-server. I want to know if there is a way to know when a session has gone. I mean, you can know this if, for example, you call the isNew method. But for example, if you close the browser, the session is gone, but obviously, I can't call the isNew method from anywhere, so... how can I know when the session is killed by closing de browser or if the user leaves the site. You can use the onUnload of JavaScript, but I don't want to call a new window when this happens.
Hope you can help me!

You probably can't tell. But then you don't want to do that logic anyway... I was just at your site, and I was signed on, then somebody came in and asked me something so I had to look at another site, then I pressed the back button and now I'm at your site again, but you signed me out? What's with that?

Similar Messages

  • How to know when a session expires

    Hello,
    I want to know is there any way to know when a users session ends or when he moves to another site. For example in a Chat to know when a user after logging in just closed his browser window without logging out and then how to remove that users name from our users list.
    Is there any event that fires to notify that a user's session has ended and then we can remove his name from logged on users list.

    Hi honey jal,
    Here I am giving you related url , which tells about chat discussion when session is going to be ends. I hope this one help you out.
    http://groups.yahoo.com/group/www-talk/message/9626
    Regards
    Tirumalarao.
    Developer Technical Support,
    Sun Microsystems,India.

  • HT2173 How to know when a hard drive has failed ?

    How to know when a hard drive has failed ?

    Machine doesn't boot.  You experience strange crashes.  Gets wrong results.  Your harddrive is five or more years old.  Time to consider repacing it.   You do have backup?
    You may want to run these "standard" fixes if the problem persists.
    1) Check the amount of free space on your harddrive.  You should have a several gigs free.
    2) You should run disk utility
         a) verify the disk
         b) update your permissions.
    3) Try a safe boot.
        Shutdown your machine.  Hold down the shift key.  Poweron.  Wait awhile Wait awhile while you harddrive
          is being checked.
        http://support.apple.com/kb/ht1455
    4) You may want to run applejack to clean up your machine.
         http://applejack.sourceforge.net/
    a lot more ways to fix your Mac.
    http://www.thexlab.com/faqs/faqs.html
    verify & repair your startup drive
    To verify & repair you file system on the startup drive, you will need to run disk utility from you installation DVD.
    This article  will tell you how to get to disk utility.  Once in a disk utility, you can go and attempt to recover the disk.
    http://support.apple.com/kb/TS1417
    To repair your startup drive, you will need to run disk utility from your startup DVD.
    Mac OS X 10.4: About the utilities available on the Mac OS X 10.4 Install DVD
    http://support.apple.com/kb/HT2055
    How to run disk utility from your startup DVD.
    Insert your  startup DVD  into your reader.  Power down your machine.  Hold down to the c key.  Power on your machine.  This will bootup your startup DVD.
    This will bring you to a panel asking you for your language.  Pick your language.
    You you come to the Install Mac OS panel.  Do not install.
    Click on Utilities menu item.  This will give you a pulldown list of utilities.
    Click on the disk utility.
    You are now in disk utility.  Pick your disk.  Click on repair it should be on the lower right of the panel.
    Once the repair completes successfully, you should update your permissions.
    Verify a disk
    As an alternative, you can verify that the filesystem on the disk is correct. You will not be able to repair the file system.
    I suggest that you use disk utility to verify that your startup disk is OK. 
    Macintosh-HD -> Applications -> Utilities -> Disk Utility 
    Start up disk utility.  On the left pane view, you will see a list of all your disks.  
    Click on your startup disk.
    Click on the First Aid  Tab.
    Click on verify.  
    Hopefully your disk will verify.  If not, you have to boot from your installation DVD and run Disk Utility from there to attempt to repair your file-system.

  • How does c:url tag know when the session is cookieless and thus to redirect

    i have been looking at the source code for c:url tag and can't figure out how they are doing that. I need a way to do that in a jsp, to check if the cookies are allowed or not.

    how does c:url tag know when the session is cookieless and thus to redirecthuh?
    What do cookies have to do with redirecting?
    Cookies get encoded into a URL using the method in HttpServletResponse: response.encodeURL() or encodeRedirectURL().
    That method determines whether or not it prints out the session id as part of the url, or it gets uses cookies.
    You can try: request.isRequestedSessionIdFromCookie().
    If that is true, you know that session cookies are supported (or at least that one was)

  • How to know if a file has been updated in iCloud after modification?

    How to know if a file has been updated in iCloud after modification?
    I work on various app including Keynote on my Mac Pro. And after modification, i close file and I wait.
    When I see no more Internet traffic. I assume that keynote has uploaded all the works I have done into iCloud.
    But when I open the same file on my iPad on the way to work. I do not see the file updated.
    I assume that I did not wait long enough.
    I wished I had a way to enforce the updated file to upload and way to get confirmation that it has been completed.
    In windows I simply push the sync button.
    But for iCloud I do not yet see anything like that.
    Please help.

    you would be better served asking this in the iCloud discussion, where users are more knowledgeable about iCloud. Replies on iOS and iCloud issues are usually unanswered here because of our lack of knowledge.

  • How to know if a session finished in jsp

    Hello,
    How to know if a session finished in jsp?
    Help me please.
    Best Regards.
    Joseph

    Depends. You can create a javax.servlet.http.HttpSessionListener implementation and register it in the web.xml file (I forget the syntax, though), which can notify you of sessions being created and destroyed.
    Or you can create a javax.servlet.http.HttpSessionBindingListener implementation and add it to the session (setAttribute()) and it'll have it's valueUnbound method called when the session expires (or the attribute is removed, but if you don't remove it, the session invalidating will). That's a good place for session-specific clean-up.

  • How to know when invoke bytecode implements?

    I've got a classfile - it has few invokeinterface bytecodes inside - their count is defined dynamically - when class is running.
    And I've got a program, which runs this class.
    The aim of this program - to gather statistics of invokeinterface calling frequency.
    How to know when invokeinterface bytecode implements?
    (In that moment I plan to update several digits)
    Have You got an advise for me?
    Thanks.

    You must use the debugging interface, or get a code profiler. Do a search on all forums for profiler, you'll get tons of information.

  • Upgrade from CQ5.4 to CQ5.5, how to know when the initial startup is completed?

    The documentation at http://dev.day.com/docs/en/cq/current/deploying/upgrading.html under "STANDALONE (QUICKSTART) UPGRADE" step 3 says that the upgrade process "might take a few minutes". How do we know when the system has been started successfully? When monitoring the error.log file, it looks like that after a while (~20 minutes) an upgrade of the workflow models is started (even though step 4 says that workflow models will be upgraded after a restart). Might there be any problems with stopping the server to soon?
    So, to summarize: how do we know when the server has been started successfully?
    Thanks
    Joakim

    In the error.log you would see message like "Finished upgrading". Alternatively you would see 5 completed task in crx explorer at location /var/upgrade/status

  • Project Managers to know when a task has been updated for the last time

    Hi,
    I would like know if there is any timestamp feature in Project Server 2007, so that it can be possible for Project Managers to know when a task has been updated for the last time.
    Thanks in advance

    Hi,
    If you are using the My Tasks to drive the task updates then you can use the 'Applied Requests and Errors' available under 'Go To' in the Task Updates area. Here the PM can find when requests have been approved and how many updates he/she received for a
    particular task (by clicking the task name) etc.
    Hope this helps
    Paul

  • Knowing when a page has finished loading

    Hi all,
    I've  produced  a small project that has  a  few tabs, each tab contains an IFrame UI, which loads a BW report.
    I've been asked to  add an indicator that should tell when the reports are finished loading.
    I have two problems:
    1. How  do I know when the frame has finished loading the url? I know I can use the OnLoad tag in html, but how can I edit the HTML WebDynpro produce?
    2. What kind of indicator can I use? I thought of two options - Putting the "Progress Clock" which WebDynpro uses when calling an RFC, and for that I need to know if it's even possible  to call that clock.
    The 2nd option I thought  of is using the ProgressIndicator UI, and just divide the 100% to the number of tabs, and change the percent value when each tab  has  finished loading the URL.
    I appreciate any help  that  you  could provide.
    Yaniv

    Armin Reichert -> I've tried what you suggested about the portal integration (I send parameter to an URL Iview, which changes the url), and it works great!
    Thanks.
    Noufal Kareem -> Because I use an IFrame UI which loads a BW report, I don't have an indication (The WD don't know / care if the page inside the frame was loaded.)

  • I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    Mail and Address book

  • How to know if a parent has no children in JTree?

    How to know if a parent has no children in JTree?

    Be careful about depending on isLeaf. Common practice states that isLeaf() returns true ONLY if the node in question is not capable of having children (for example, a file in Windows Explorer). A directory with no items in it would not be a leaf node, but would have a child count of 0.

  • How to know when the PRICE AFTER DISCOUNT changed and get the value

    Hi,
    Everything I do to see if a value changed in the grid works except for PRICE AFTER DISCOUNT
    which seems to be inaccessible.
    Any idea how to know when exactly this value changed and do actions accordinly ?
    Also I always get 0.00 if I try to get the value of it
    This works to get in the condition of a vlaue changing but I always get 0.00 as the value of the column
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_DISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_DISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
        catch (Exception ex)
            SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    And this do not even get into the condition even tought I SEE the column PRICE AFTER DISCOUNT:
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_PRICEAFTERDISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_PRICEAFTERDISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Price after discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
         catch (Exception ex)
             SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

    just idea, maybe it will works
    Create one udf in row level and set there FS based on changes on price after discount and fill value what is in price after discount. Then the validation make on this field instead of standard SAP field.

  • How i know when a EXECUTE_QUERY retrieved last record

    Hi...
    How i know when the EXECUTE QUERY retrieved the last record in a block ....?
    Exist a trigger after trigger POST-QUERY?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

    Kevin, sorry
    But the :system.last_record not change the value during the execution of EXECUTE_QUERY.
    Only useful when the data was retrieved into blocks...not during..
    Other mode?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

  • How to know when I'm doing a createInsert?

    how to know when I'm doing a createInsert, this to hide a button when you run this action, I am using a task flow.
    my version of jdeveloper is 12c

    hi,
      So you are using the createInsert as a method call in task flow. That is your form/table will be come new rows and you want to disable some button.
    Your task flow might be as below
          CreateInsert---->Page.
    To do so
    1.) Take properties of your method call and bind the Method property to a method in a bean (bean registered in the task flow with scope view or any higher scope)
    2) Call the create insert operation programmatically in that method.
    3) And in that method after the createinsert ,set a boolean variable in pageFlowScope.
    4)Put this variable in the disable property or visible propery of the button you wabt to hide/diable.
    eg:
        public void doCreateInserOperation(){
            try {
               // Programatically invoke CreateInsert
                DCBindingContainer bindings = (DCBindingContainer)getBindingContainer();
                bindings.getOperationBinding("CreateInsert").execute();
            //Set a variable in page Flow Scope 
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("disableButton", true)
            } catch (Exception e) {
                e.printStackTrace();
        public BindingContainer getBindingContainer() {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
            return (BindingContainer)valueExp.getValue(elContext);
    you can access this variable in EL expression as #{pageFlowScope.disableButton}. So when your page render it will be in CreateInsert mode and the button will be disabled/hidden.
    I hope this will help you.
    With regards,
    Gijith.

Maybe you are looking for