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.

Similar Messages

  • Display Do u want save changes or not? message while closing the window

    Hi All,
    I have one requirement.I developed one form that contains 4 windows.
    I entered in the 3rd window and i have made some changes but not saved.when i close 3rd window it is not giving any message like 'Do u want save changes?'after closing the 3rd window cursor will go to 2nd window.if i open 3rd window again it is propmting the message(Do u want save changes or not?).How can i get this message while closing the 3rd window?
    i have written the following code in app_custom body
    IF (wnd = 'WINDOW1') THEN
    app_window.close_first_window;
    ELSIF (wnd = 'WINDOW3') THEN      
    lv_wnd_status := get_window_property('WINDOW2',VISIBLE);
    IF lv_wnd_status = 'TRUE' THEN
         go_item('BLOCK2.ORDER_NUMBER');
         set_window_property ('WINDOW3', visible, property_false);
    ELSE
    app_window.close_first_window;
    END IF;
         ELSIF (wnd = 'WINDOW2')
    THEN
    lv_wnd_status := get_window_property('WINDOW3',VISIBLE);
    IF lv_wnd_status = 'TRUE' THEN
    set_window_property ('WINDOW2', visible, property_false);
    ELSE
    app_window.close_first_window;
    END IF;
         ELSE
    app_window.close_first_window;
    END IF;
    Can anyone give me some idea.
    Thanks in Advance
    Edited by: DhanaSurya on Apr 27, 2010 9:41 PM

    Iis this the only code which you used to hide/display window?
    Might be some navigation is happening in your form. Like if there is relationship between window2 and window3's block and when you access the window2 then you try to move to the next reocrd and then you are try to go to the WINDOW3's block.
    Or there is any CLEAR_BLOCK built-in bieng use in you form.
    -Ammad

  • How can Java trap closing DOS window

    Hi all:
    This pertains to Windows.
    I have an application which needs to be shut down in a controlled fashion. Unfortunately I can't get my users to cooperate.
    I have learned how to trap for Ctrl-C and do a controlled shut down.
    I can't prevent them from closing the window the program runs in or the other ways to shut a program down from Windows.
    Is there any way to trap for the user closing the appliation (either by clicking the X in the top right or by choosing Close-AltF4 from the pull down). I would like to trap for the event and do a controlled shut down of the application before Windows pulls the gound out from under it.
    Thank!
    BillB

    Check this out:
    http://java.sun.com/developer/TechTips/2000/tt0711.html

  • How to close a HTTP session when a user closes the window

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template and this was implimented on the Menu page, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly.
    If user navigates to the other pages from the main page... then the logoff function was not implimented in the other pages. So many of the users are closing the windows directly. Eevn if we impliment logoff in all the subpages, As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    Regards,
    Tony

    Hi,
    And also take a look on the Genral property of the web template. We solved this problem by changing only this property (no extra things).
    <b>Property:                            Value</b>
    Automatic Session Management:           Active
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • Run time error while closing the CRM Order using BAPI

    Hi Experts,
    Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue.
    I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep the order in resolved status only. We will not directly close the order from the CRM tool, instead we have created a custom program for the same purpose.
    For the custom program we will give input as the order number and execute it, this will close the order.
    Here close the order means assigning it to Close status as well assign the reason code.
    We have created some reason codes for closed status.
    So when the program is run the Order moves from resolved status to closed status along with reason code.
    But of late we are facing some problems with this program, it is giving run time error for some CRM orders.
    Run time error message : The ABAP/4 Open SQL array insert results in duplicate database records.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught in procedure "CRM_SERVICE_OS_UPD_OST_DU" "(FUNCTION)", nor was it propagated by a RAISING clause.
    Please find my code which have used in the custom program
    Closing the resolved SOs in the system
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
            EXPORTING
              objnr                     = iv_guid
              user_status          = lc_status_closed
           EXCEPTIONS
             object_not_found          = 1
             status_inconsistent       = 2
             status_not_allowed       = 3
             OTHERS                        = 4.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining status'.
        ENDIF.
    Set reason code
    build lt_subject
        ls_subject-ref_guid = iv_guid.
        ls_subject-katalogart = 'A2'.
        ls_subject-codegruppe = 'ZR000003'.
        ls_subject-code       = 'ZR33'.                      " Reason code
        ls_subject-mode       = 'A'.
        APPEND ls_subject TO lt_subject.
    build lt_ossset
        ls_osset-ref_guid        = iv_guid.
        ls_osset-subject_profile = 'ZREASON03'.
        ls_osset-profile_type    = 'G'.
        ls_osset-subject         = lt_subject.
        APPEND ls_osset TO lt_osset.
    build lt_service_os
        ls_service_os-ref_guid  = iv_guid.
        ls_service_os-ref_kind  = 'A'.
        ls_service_os-osset     = lt_osset.
        APPEND ls_service_os TO lt_service_os.
    build lt_input_fields
        REFRESH: lt_input_fields, lt_field_names.
        CLEAR  : ls_input_fields, ls_field_names.
        ls_field_names-fieldname    = 'CODE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'CODEGRUPPE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'KATALOGART'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'SERVICE_PROFILE'.
        APPEND ls_field_names TO lt_field_names.
        ls_input_fields-ref_guid    = iv_guid.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'SERVICE_OS'.
        ls_input_fields-field_names = lt_field_names.
        APPEND ls_input_fields TO lt_input_fields.
         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            it_service_os     = lt_service_os
          CHANGING
            ct_input_fields   = lt_input_fields
          EXCEPTIONS
            error_occurred    = 1
            document_locked   = 2
            no_change_allowed = 3
            no_authority      = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining reason'.
        ENDIF.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save   = lt_header_guid
            iv_update_task_local = lv_update_task_local
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            document_not_saved   = 1
            OTHERS               = 2.
        IF sy-subrc <> 0.
          WRITE : 'Error at saving'.
        ELSE.
          WRITE : 'Successfully Closed'.
          COMMIT WORK AND WAIT.
        ENDIF.
    Run time error is coming at COMMIT WORK AND WAIT statement.
    Please let me know any corrections are required in the above program.
    When I analyzed the run time error I have found that it trying to insert the record in CRMD_SRV_OSSET for that CRM order, but already one record is present in the table for the same CRM order number.
    For most of the CRM orders there is no entry in this table so they are closing successfully but for a few orders for which there is an entry we are getting the above run time error.
    There is nothing wrong with the orders which have an entry already in the table CRMD_SRV_OSSET, I need to close these kind of orders with out run time error.
    Kindly provide your feedback.

    Hi Dinakar,
    You posted this in APO PPDS forum. This question should go to PP forum where someone could answer it.
    Please close this thread and open a new thread in PP forum so that you could get help quickly from the relevant experts.
    Regards - Pawan

  • While closing the document .exe (or) a script should be get triggered?

    Can anybody tell me the feasibility of the below process in Adobe
    Illustrator:
    While closing the Illustrator(CS,CS2 and CS3) document(please note that not Application!), an .exe (or) a script should be get triggered. Is this possible pals, if so, is this possible in Java script (or) VB script?
    Could you please let me know the details and samples.
    Thanks in advance
    Prabudass

    I'm not into scripting outside of After Effects, but most likely this will have to be VB script, not Java. Similar to a thread recently on the Photoshop forum, you'd monitor the window states and their parent/ child relationships. This might however only work in older versions, as CS3 and CS4 use Adobe-specific UI stuff that may not be accessible in that manner. On the other hand it just might by ways of the Flash panel stuff as e.g. used in Adobe Configurator for Photoshop. Maybe investigate these options...
    Mylenium

  • Logoff while closing the browser.

    HI all,
    Portal logoff is different from closing the browser,as i know.
    But can we do logoff while closing the browser?
    We must close the session such as BSP application.
    Any helpful answer is welcomed.
    THank you.
    Best Regards,
    delma

    hi
    THank you for your advice.
    The strange thing is : there's no popup "closing session" window when i close the browser.
    And I look after the trace.No dsm.terminator is called at all when i close the browser.
    But when I logoff, dsm.terminator is called and the window is poped up.
    This is what i am confused.
    Thank you.
    Best Regards,
    delma

  • Error while closing the open purchase order for MRP run

    HI expets,
                     We are facing issue while closing the old purchase order(18.12.2007) for MRP run, if we are clicking delivery completed for the particular line item ,system is showing the error NET PRICE MUST BE GREATER THAN ZEROthough we have made GR and IR aganist the line item an value is also showing in the purchase order history tab, but in the condition tab there is no value showing for the particular line item .Kindly suggest the way forward.
    regards
    Karthick sundaram

    one thing for sure, you cannot proceed without maintaining proper conditions in the PO.
    Why they are not there or not anymore there is probably caused by customizing or vendor master data changes.

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How do I sort or reorganize while using the new Numbers 3.0

    How do I sort or reorganize while using the new Numbers 3.0; I can't seem to find the sort icon.
    Thanks
    ActiveSolutions

    Yes, I understand the convenience of the old Reorganize panel. I thought it was great. The problem is (I'm guessing) that it is really hard to do something like that in Numbers iOS and Numbers for iCloud. So they gave us features that are more likely to work across all platforms.
    If you need to sort just selected rows you could put the =A&C&B formula (or whatever order you need) in just the rows you need to sort. Leave the other cells in column D blank.
    Or, if you're doing a LOT of partial sorting like that maybe you should have the data in separate tables anyway.
    Not saying it's great... just saying there are workarounds... until (if) something like the Reorganize panel comes back by popular acclaim. 
    SG

  • How can i let my java application closes the other opened windows

    how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance

    you'll have to use JNI to access the windowAPI
    then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
    somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
    regards
    Spieler

  • While closing the Photoshop document an ".exe" (or) a script should be get triggered?

    Can anybody tell me the feasibility of the below process in Adobe
    Photoshop:
    While closing the Photoshop(CS,CS2 and CS3) document(please note that not Application!), an .exe (or) a script should be get triggered. Is this possible pals, if so, is this possible in SDK? Could you please let me know the details and samples.
    Thanks,
    Prabudass

    You can use the automation plug-in type to listen for eventClose. See the Listener example in the SDK.

  • Backend BSP session not closing on server after closing the window

    Hi All,
    We have SAP EP (7.0 SP21) and there is a BSP transaction ivew (Interaction Center ) intergrated in the portal. The issue is when the user performs any transactions inside the BSP and then closes the browser, session remains on the server till the timeout. Is there a way to end those sessions on server after closing the browser immediately?
    Portal domain : xx.mycomp.com
    ABAP system domain :mycom.com
    Should the domains be same for the DSM of Portal to work or is there any solution that can be considered.
    regards
    Uday

    Hi Uday,
    These are the main issues that can cause issues with DSM:
    JavaScript Origin Policy:
    Scripting
    between different domains is not allowed because of “JavaScript origin policy”.
    Also
    communication between mixed protocols (http\https) is forbidden.
    Therefore
    the portal server and the content server must be on the same domain and must
    use the same protocol.
    For
    detailed explanation see:
    http://mozilla.org/projects/security/components/same-origin.html
    Popup Blocker:
    •Popup blockers may cause troubles
    in relation with SRA feature.
    •Terminator handles notifications in
    new window when current window is being destroyed (logoff, closing browser
    window) – popup blocker prevents the opening of new window, hence no session
    handling performed.
    please also check SAP Note #596698 for more information typical problems and troubleshooting.
    In general, the 2 domains should be the same.
    xxx.mycomp.com, meaning that first part of the url can change but what comes after should be the same domain.
    Best regards,
    Etay

  • How to make session invalid when user refresh the page?

    How to make session invalid when user refresh the page?

    I have a <form> in a JSP file that has another JSP file as an action.
    I have main.jsp that has <form> with action.jsp file as an action.
    Now when I submit the <form>, request forwarded to action.jsp and it will take the action. But this file is taking so long, hence user refresh the page again and again, hence duplicate request processing is occuring.
    I want to prevent this.

  • How to deal with  time zone while upgrading the database?

    Hi,
    How to deal with time zone while upgrading the database?
    Thanks
    Edited by: user12135020 on Jul 4, 2011 3:06 AM

    Hello,
    I answered to a Wrong post.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Jul 4, 2011 12:15 PM

Maybe you are looking for

  • Flash CMS into an animation

    I need to re-create a website for a client who cannot get hold of the original flash files, but now they need to be able to login and upload their images into a animated banner section (Flash CMS system) and manage it. Can anyone help me? this is the

  • Load items in JComboBox

    Hi all, May i know how to load the files from a folder into a JComboBox. How can i refresh the items everytime the comboBox is clicked?

  • Read parameter error -50 with larger file - please help

    I have this line of code: (read sfRef from SourcePosition as data) It works fine with these 811.2MB files but when I try to read from a 1.62GB file I get parameter error -50. Did I miss something about larger files?

  • Premiere Pro CS5 when recording echos and reverbs- help pls?

    Just purchased Master Suite and when trying to record in Premiere Pro CS5 through headset set up or microphone, all good equipment, I get lots of echos and intense "reverb" I believe... tried changing settings and turning off speakers etc.. with no l

  • Why does iTunes (11.1.2) radio streaming keep stopping.

    For no apparent reason the streaming stops.  Quitting iTunes, then restarting, often restores the stream, but not always.  Very annoying.