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.

Similar Messages

  • 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?

  • 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 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.

  • Is it possible to auto delete directory when the session expires?

    I create a directory for each session based on the unique session id e.g. c:\website\8D143E46EA18FAEFEF4D807180A307E2
    Is it possible to auto delete this directory when the session expires?

    thanks
    i found this great link which teach how to use HttpSessionListener, in case someone has the same problem as me.
    http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1

  • Redirect to main jsp when the session expires

    Hi,
    I have a jsp say mainframe.jsp in which I have two frames each having a jsp page say child1.jsp and child2.jsp.
    When the session expires and I when i try do any changes in child2.jsp or child1.jsp, the page redirects to login page and when I login successfully, I am getting redirected to child2.jsp or child1.jsp respectively. But I want it to be redirected to mainframe.jsp.
    Any help is greatly appriciated.
    Thanks in advance.
    Vinod

    I think I am not clear.
    When I try to login after session expiry, I am redirected to child jsp.
    But what I want is that I should be redirected to mainfram.jsp page.
    url in the address shows : ../mainframe.jsp?ID=******
    When my seesion is expired and I try do some manipulation in child1.jsp (which is inside a frame of my mainframe.jsp). it is redirected to login page and from there to child1.jsp instead of mainframe.jsp
    Now the address url shows : ../child1.jsp?ID=********* because of which I am not able to see child2.jsp along with child1.jsp
    What I want : ../mainframe.jsp?ID=********
    this is the code I am using !!
    String destPage = request.getRequestURI();
    response.sendRedirect("../redirect.jsp?dest=" + URLEncoder.encode(destPage));

  • 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 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 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.

  • 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.

  • 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 to know when the JComboBox popup is about to show or hide?

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

  • Alert when the session Expires

    Hi Everybody,
    I am doing a web based application in JSF ,in that I want to make an pop up or an alert message automatically when the session expires.please give me valuable inputs on this regardings...
    Thanks in Advance

    Hi,
    yes...I have tested correctly.But here I am giving <a4j:support> to specify the dropdown listbox action.only for this reason the form is not submitting when I use dropdownlist..for ur reference here is a sample code
    <h:selectOneMenu id="animalNameCombobox" value="#{Animal.animalName}" styleClass="sampleDropDownListBox">
                                        <f:selectItems value="#{Animal.animalItemList}"/>
                                        <a4j:support action="#{Animal.animalComboboxAction}" event="onchange" reRender="animalOutputPanel"/>
                                    </h:selectOneMenu>I have given all this within <a4j:outputpanel>..Is there any remedies are there to resolve this issue...please give me a valuable inputs and suggestion on this regardings..
    Regards

  • How to know when server automatically invalidates session

    Hi !!!
    I am storing a result set in the session .....
    Well there is some need to store result set in the sesssion..I am displaying data in my JSP by retrieving the data from the result set...Now I want to close the connection and result set... when the server invalidates the session ......
    Any way to do that???
    Reagrd

    If objects that you store in session implement HttpSessionBindingListener,
    they will be notified by valueBound() and valueUnbound() methods when object
    is stored or removed from the session. Object is removed from the session when the session is invalidated, so you can close your db connections from valueUnbound() method. I had the same problem and this works for me.
    Milan Mogin
    http://www.dolithe.com

Maybe you are looking for

  • Setting up secure chatting without a MobileMe account

    Hi Some experimenting lead me to believe that it is indeed possible to setup iChat 4 to sign and encrypt messages without a MobileMe account. 1. Open Keychain Access 2. From the Keychain Access menu, choose Certificate Assistant > Create a certificat

  • Watch streaming video in konqueror

    Is it possible to play streaming video (for example the trailers from apple.com) within konqueror? I tried installing mplayer-plugin and kaffeine, but neither of them were able to do the trick? Has anyone been able to get this working? Thanks in adva

  • Problem with CUA

    Hi Team, we implemented CUA in our CRM system such as NCSCLNT300 was made as CUA and NCSCLNT200 as child system. CUA works well in most cases except for the below issue. 1. For some roles available in client NCSCLNT200, when we try to add it to a use

  • No battary detected

    i changed new battary but still I get the message "No battary detected" instead of Battary Charging. Could you please tell me what I need to do? Regards. Neela.

  • Pages are blank.

    The day before i was using Firefox 28.0 and everything was good, but today it updated to Firefox 29.0.1 an now when i go to a any page ( even Mozilla ) they start to load for a second then go blank.