How to close window that pop up other window

hey , please help me
How to I close window that produce pop window that produce the login page if the session is expired .How do I close the page produce that direct yo the login page that . below is coding used to validate if the page has expried .
if (session == null ) {
     response.sendRedirect ("../mr_emplogin.jsp");
    //check whether the password still keep in session object
    HttpSession ses = request.getSession(false);
    ///if password removed
   if (ses.getValue("password") == null) {
        //go back to mr_emplogin.jsp
     session.invalidate();
     System.out.println("Your session has expired! Please login again!");
     response.sendRedirect ("../emplogin2.jsp");
    }How do desctroy the current session and close the window parent window. please help me any idea will do .It is quite emergency.
Thank you

I tried window.close() and self.close() both are giving me errors (I am certain the problem is with the script)..What does the error messages say? Is it a server error or a Javascript error?
<c:redirect url="index.jsp"/>
<script>
     function didit(){
     window.close()
</script><c:redirect> sends a temporary redirect response to the client using the specified redirect location URL("index.jsp" in your case). Once you redirect, the response should be considered to be committed and should not be written to. The javascript codes that follow the <c:redirect> tag clearly violates this.
If your objective is to close the window then why are you redirecting?

Similar Messages

  • How to close window only if closing last tab is about:newtab

    Is there a way to achieve this behaviour:
    Let's say I have a last tab left open, for example mozilla.org or any other site. When closing that tab I want firefox to open about:newtab. This can be achieved by setting closeWindowWithLastTab flag in config. But here is the catch when closing that about:newtab I want to close window.
    So basically - Close window with last tab only if it is about:newtab. Also I want the close button on last tab to remain there.
    P.S. Last tab close button extension did not help.

    See:
    *Close Button: https://addons.mozilla.org/firefox/addon/close-button/

  • How to close tabs that will not close?

    After being on several sites I am unable to close tabs that I am done with. Started a couple weeks ago.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    It is also possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    *http://kb.mozillazine.org/Session_Restore
    *http://kb.mozillazine.org/sessionstore.js
    *http://kb.mozillazine.org/Multiple_profile_files_created

  • With an iPad (IOS5.1.1) how can you request that POP emails be saved to server?

    With my iMac OS10.8.1 with my Mail program preferences I can request that my emails (which are ATT/Yahoo POP) be saved to the server after I open them, but how do I request that my ATT/Yahoo POP emails that I open on my iPad (IOS 5.1.1) be saved to the server as well?

    Settings, Mail, click on your email account, Advanced, Delete from server - set to Never.

  • How can I set that pop-ups open in a new tab insted of new page/window?

    Dear Firefox Representative,
    I'm a regular Firefox user. Since I updated to Firefox 4, all pop-ups open in a new window insted of a new tab. Altough I set in the settings that new pages should open in new tabs, all pop-ups show up in new resized windows with the new firefox.
    Thanks for any help,
    Tib

    You can use JavaScript for this. For example:
    app.launchURL("http://www.adobe.com", true);
    More information is in the Acrobat JavaScript reference. Note that this method is new to Acrobat 7. You can still use Acrobat 5 to create the JavaScript, but it won't work for versions less than 7, or for most users of non-Adobe PDF viewers. If you go this route, you should add some code that checks the version of Acrobat (Reader), and only execute the above code if 7 or above.

  • How to close taskflow that is "Run As Dialog"?

    To open a bounded-task-flow in a modal dialog window, I used a "Task Flow Call" activity with the following settings:
    1. "Run As Dialog" = true
    2. "Display Type" = "external-window
    A command link is used to invoke the "Task Flow Call" activity so that the bounded task flow was opened in a modal dialog window:
    <af:commandLink text="Call n Dialog" id="cb2" action="openModal" useWindow="true" windowEmbedStyle="inlineDocument"
    windowModalityType="applicationModal" windowHeight="500" windowWidth="500"
    partialSubmit="true" binding="#{DynamicDashboardContentManager.modalApplicationLink}"/>
    How do I close the "dialog" window upon return from flow A ?
    For example, clicking a button on a page from flow A will close the dialog window.

    Yes, I have a different use case... calling a bounded task-flow of a remote application ie. another web application outside my own web application.
    The outcome of "Task Flow Return" of the bounded task-flow of a remote application is set to a generic outcome "done" defined in the adfc-config.xml of the remote application.
    That generic outcome just navigate to an empty page for now.
    Hence, there is no specific "Task Flow Return" activity whose outcome is set to the caller application ... I don't know if this can be done...
    Can the remote application able to close the dialog window it is running in upon the invoke of the generic outcome "done'?
    ...and how?
    Edited by: Pricilla on Mar 3, 2011 1:17 PM

  • How to close pictures that are opened by JAI.create("fileload",filename)

    After doing some deletion tests, it seems that all picture I'm loading with
    JAI.create("fileload",filename) or JAI.create("filestore",pb) stay open and prevent me from deleting those pictures.
    Do you have an idea on how I could close those pictures ?
    thank you !
    Edited by: dnlfrnc on Feb 13, 2008 10:42 AM

    Short answer: you can't if you use JAI.create("fileload",filename) :you can't rely on making a call to the garbage collector, because you can't be sure it will work.
    Instead, use the sream operator:
           FileSeekableStream stream = null;
            try {
                stream = new FileSeekableStream(sourceImageFile.getAbsolutePath());
                // use the stream operator because the fileload operator does not allow to release the handle on the opened file
                PlanarImage input = JAI.create("stream", stream);
                // do your stuff
            } finally {
                // close the stream.
                stream.close();
            } Why you don't have any means (besides gc, but I don't call that an option) of releasing the handle on a file you opened with the fileload operator is beyond me, though (especially as this operator is widely used in the tutorials, and thus is bond to end up in a lot of code)

  • How can I verify that pop-up upgrades are safe?

    I am experiencing occasional pop ups asking that I upgrade Firefox -- ie- download and install the upgrade/update offered with the pop-up. Is this offering legit?

    hello robfeimer, first you're right to be careful about such notices, since recently it has become a fairly often used tactic by malicious websites to try to trick users into downloading malware-infested versions of the browser. as a rule of thumb, when you are getting prompted to download and run a .exe file to update firefox, it will be a scam, since firefox handles updates internally...
    you can always initiate a check for updates manually in the firefox ''menu > help (?) > about firefox''.

  • How to close windows. Or erase history

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/1038541 /questions/1038541]''
    Can find a way to close visited web sies

    System.getenv("windir"); usually works.

  • I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

    I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

    I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

  • HT4623 I did the update, and now I don't know how to close an app when I'm done with it

    I did the update and don't know how to close apps that are open

    Force close apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen
    http://support.apple.com/kb/ht5137

  • How to close apps in ios 7

    how to close apps that are running in background on the Iphone under IOS 7?

    double click the home button as you did before.  when the apps appear on the screen swipe upward on the preview box above the icon, not the icon itself.

  • Apps run automatically - turn off? How to close app w/out Close option?

    I am running two apps I want to close and only run when I choose them.
    One (The Missing Sync) at least has a Close option, which works. So I can at least get that out of my running apps list.
    The other (Funambol Sync) doesn't even have a Close option!
    When I do a battery pull, BOTH run automatically so they're back in memory!
    1) How do I control which apps run automatically after a battery pull?  If I can keep them from re-running, at least I can control my memory by doing a battery pull.
    2) Any ideas on how to close Funambol Sync or any other app that has no "Close" option on its menu? I've put in a messsage to those guys but no answer so far.

    I have been told that BB does not have a central place where all auto-run apps are listed/controlled.
    Apparently each app does its own specification re auto-running, and so must be controlled one-by-one.
    For at least one of these (Funambol Sync), the only option finally available was to just delete it, which is what I did. As long as the other one "plays nice", it can stay!

  • When highlighting text and searching with Google, even though my default browser is Chrome, it searches with Safari.  How do I change that?

    Using iMac and Maverick OS.  I have Chrome as my default browser.  I find that going to System Preferences/General under default browser, I note that Chrome is chosen as default, yet the browser "above the line" is Safari and Chrome, while checked off is "below the line".  In other words, the top listed browser is Safari which is unchecked with a line underneath, even though all the other browsers are listed below the line and only Chrome has a check mark. 
    When I am on a website and I select words to search in Google, it always searches with Safari instead of Chrome.  How do I change that?

    Thanks for your response.  I think it was my error in that I did not define the problem properly.  Indeed Chrome is my default browser.  And Maverick does not have a "next line" to default to Google.  I can do that in the Chrome settings. 
    My problem is that when I am in another application.....and it is apparently an application native to Maverick....for example Contacts or Calendar, Reminders, Notes, etc., if I highlight a word or phrase, and right click and choose "search with Google", it defaults to Safari.  How do I change that?

  • When I launch Mail, the last email on the bottom of the mail list is highlighted, not the latest email on the top. How do I correct that?

    When I launch Mail, the last email on the bottom of the mail list is highlighted, not the latest email on the top. How do I correct that?

    When I launch Mail, the last email on the bottom of the mail list is highlighted, not the latest email on the top. How do I correct that?

Maybe you are looking for