How to close browser window after user log out

Hi,
Does anyone know how I can close browser window after user logs out. The scenario is when user clicks a log out button I will invalidate user session and close the browser right away in the backing bean.
Your help would be appreciated.

Try run this and you'll see that it runs fine with no exceptions:
<%
     String someText = "bla bla bla";
     response.setContentType("text/plain");
     response.setHeader("Content-Disposition", "attachment;filename=message.txt");
     try {
          ServletOutputStream os = response.getOutputStream();
          os.write(someText.getBytes());
          os.flush();
          os.close();
     } catch (Exception e) {
          out.println("ERROR: " + e);
%>It looks like that after I've closed the outputStream I can't do any more processing in the JSP. Even if I remove the setContentType and setHeader methods it still behaves this way.
I'm starting to think that there's no way around this...??

Similar Messages

  • How to close browser window after flushing a file to the browser?

    I have this simple JSP, which flushes a String to the browser as a file (message.txt). The JSP gets opened in a new window when the user clicks a link.
    The problem is that after the JSP has run, the browser window won't close automatically. I've tried adding a small javascript to achieve this, but i doesn't seem to even get run.
    How can I close the browser window after the JSP has run?
    <%
         String someText = "bla bla bla";
         // Flush to browser
         response.setContentType("text/plain");
         response.setHeader("Content-Disposition", "attachment;filename=message.txt");
         try {
              ServletOutputStream os = response.getOutputStream();
              os.write(someText.getBytes());
              os.flush();
              os.close();
         } catch (IOException e) {
              return;
         } catch (Exception e) {
              return;
    %>
    <script type="text/javascript">
         window.close();
    </script>After the JSP has run, an empty html page with the following source can be seen:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
    <BODY></BODY></HTML>

    Try run this and you'll see that it runs fine with no exceptions:
    <%
         String someText = "bla bla bla";
         response.setContentType("text/plain");
         response.setHeader("Content-Disposition", "attachment;filename=message.txt");
         try {
              ServletOutputStream os = response.getOutputStream();
              os.write(someText.getBytes());
              os.flush();
              os.close();
         } catch (Exception e) {
              out.println("ERROR: " + e);
    %>It looks like that after I've closed the outputStream I can't do any more processing in the JSP. Even if I remove the setContentType and setHeader methods it still behaves this way.
    I'm starting to think that there's no way around this...??

  • How to ensure OC4J runs after user logs out of a W2003 Server

    Greetings,
    I have a question. We have BI Publisher running on a W2003 server. When I log into the server, a dos window starts up, and runs the OC4J stuff. When I log out of the server, this process stops.
    In order to use the scheduling part of BI Publisher (meaning, reports can be emailed out), the OC4J window must be running (meaning, I cannot log out of the W2003 server).
    How do I ensure the OC4J process remains running after I log out of the W2003 server? Note - this was fresh server, with a clean OBISE (Oracle Business Intelligence Standard Edition) install.
    Thanks,
    Colin Jensen

    Use the services created at installation time to startup Oracle AS components.
    thant should do the trick

  • Preventing browser keep data information after user log out

    Is it possible to prevent browsers from remembering pages so
    they not available after user logs out and click back button pages
    with data information will be deleted?
    How to not aloud to keep it in \Local Settings\Temporary
    Internet Files
    What is the best way to do it? Is any way around this
    problem?

    Are you using 3 line just to make sure it working across
    multiple browsers?
    It looks that they doing same thing, am I right?
    I did test it on IE 6 and it looks like only
    <CFHEADER NAME="cache-control" VALUE="no-cache">
    does the trick
    and
    <CFHEADER NAME="Expires" VALUE="Mon, 06 Jan 1990 00:00:01
    GMT">
    <CFHEADER NAME="Pragma" VALUE="no-cache">
    does not make much difference.

  • How to close Browser window from Applet ?

    I am looking to close the browser window based on an action within applet . any ideas ?

    Hi U can close the Browser window in which the applet
    opened
    try this,
    Just call this where u want to close the browser
    import java.net.*;
    URL url;
    url=getCodeBase();
    try{                    getAppletContext().showDocument (new URL (url+"close.htm"));
    }catch(MalformedURLException e){showStatus("no file");}
    In the close.htm have this code
    ///close.htm
    <HTML><SCRIPT>
    <!--
    window.close();
    //-->
    </SCRIPT></HTML>

  • How to close browser window ?

    Can someone help me?
    I need to close the browser window when I exit form in WEB mode
    (i.e. using the toolbar exit button).
    I think that, using a javascript inside the HTML cartridge, it
    should be possible.
    For example see the following.
    <SCRIPT FOR=dev60 EVENT=????? LANGUAGE="JavaScript">
    window.close;
    </SCRIPT>
    To make running this I must to know the event name generated by
    the form applet.
    Does someone know it?
    Is there some documentation about this argument ?
    Thanks
    Luigi
    null

    Never mind, found the answer here:
    Re: Closing brower window

  • Rules within sequence are not completing after user logged out.

    We have been noticing since yesterday that rules within a sequence not being completed when user logs off planning.
    A. User kicks off a sequence from planning. This sequence has 4 rules.
    B. Logged off either after launching or after waiting few minutes and logged off.
    C. Next rules do not start and we noticed session is ending from AAS.
    However user closes browser sequence completes. Yes sequence has no errors. It was working fine until last week and only change was 'NETDELAY' value. Changed from 1500 to 60000.
    Not tried from SmartView yet.
    Edited by: venuramini on Jun 22, 2009 5:40 PM
    Corrected typo in title.

    Reason for changing from 1500 to 60000 was, do not remember exactly, issue with MS Excel connectivity. We implemented long ago in dev but never updated other environments.
    As far as other HBR_MAX_WAIT_FOR_RULE and HBR_MONITOR_DELAY we have tried and did not achieve desired results.
    FYI: we are using Planning 9.3.0.1 and wanted rules running longer than 60 minutes to go in background mode. But above setting would not be useful for 9.3.0.1.
    Am I confusing you?
    More info of original issue: Business rules time-out. Planning 9.3.0.1
    Since then, we have increase web session time-out to 720 min (12 hours), in-activity session timeout to 720 min to let sequence complete even if user session timed out.
    Thanks!
    Venu

  • Key Sequence To Return To Login Window Without User Logging Out

    Anyone know the key sequence to return to the login window without requiring the user to log out?
    I know this is possible from the menu bar when you have fast-user switching enabled, but I'm trying to get rid of that menu bar icon but I'm looking for an alternative.

    Create a script in Script Editor with the following:
    do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"

  • How to close browser window with AS2

    I'm currently working with a flash movie that opens up an IE browser to an external link.
    Since I'm working with a presentation that plays automatically after a few seconds and keeps loading new IE browsers with different links, I was wondering if there was a way with AS2, i can have flash close the IE window it opened?

    I need to close the IE window WITHOUT the use of a button. I need
    to have flash close the IE window it opens after a couple of frames. thanks in advance

  • Express install always asks user to close browser window

    Is Adobe in charge of the code that closes browser windows at
    the end of express install?
    I'm currently using SWFobject 1.5 to embed my flash movie
    with express install active and neither IE6, IE7 or firefox will
    automatically close once express install has finished. It used to
    be that IE would close and reopen the window, firefox never used to
    but that's a different topic I'm sure.
    Perhaps Adobe changed something?

    Never mind, found the answer here:
    Re: Closing brower window

  • How can I set a specific user log on neme to a specific machine

    Greeting,
    I have a question : 
    How can I set a specific user log on name to a specific machine.
    e.g. 
    Only User.A can log on to PC.A and the other can not.
    Base On :
    Windows Server 2003
    Active Directory Version : 5.2.3790.1812

    Technically we're both right.  This depends on what scenario you're setting this up.
    1)  If you want to say only this person can log on to this machine, and it's not an enterprise solution (meaning you have a handful of computers you want restricted, not all computers) then do something like Yan Li has recommended.  However, I
    do not recommend using any DENY LOCAL LOGON user rights.  In this case, you would have to deny everyone except 'User A' and your Administrators.  If you put a user in ALLOW LOCAL LOGON and DENY LOCAL LOGON, then DENY wins and no one logs in.  Instead,
    you should remove all the settings from ALLOW LOCAL LOGON and add only User A and administrators.
    2) If this is an enterprise solution, use the LOG ON TO option I mentioned before.  Managing user right assignments per machine is very difficult and isn't a practical way to do it on a large scale.  If every user in your domain is assigned a computer
    that they can use, only that user can use that machine and that machine will effectively only allow that user.  For this to work, EVERY user must be restricted to a workstation, if no setting is present, then that user can log on anywhere.  This
    is my preferred solution still.
    Like I said, it depends on your situation to which route is better.  I hope this helps and is clear and easy to understand.
    - If you have my posts to be helpful, or the answer, please mark them appropriately.  Thank you.
    Chris Ream

  • How to close open windows with ios7, How to close open windows with ios7

    How to close open windows with ios7, How to close open windows with ios7?

    Guess they thought we needed more exercise so now we have to swip them to close.....miss iOS6. My eyes are blurry now after looking at my phone, and my arms are tired from swipping lol

  • How to close ie window?

    hi,
    i need to write a program that could open and close a particular url in ie browser for a particular number of times. i could open the browser using following code
    cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    Process p = Runtime.getRuntime().exec(cmd);but i could not find how to close the window - please help

    p.destroy()... but how do you decide when to destroy the process -- are you using a timer or whuh?
    By the way, if you just want to open a browser in a platform independent way, you could try the new Desktop [browse |http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)] method.

  • How to close browser?

    Hi,
       I have a requirement wherein the WebDynpro application, which opens in a new browser using a link in portal, needs to be closed using a button.
       I have tried this out by two methods but both didn't work:
    1: I have used exit plug and changed the logoff page. Using this I was able to close the WebDynpro application but the browser didn't close.
    2: I have created one html file having javascript to close the browser which I have put in the mime repository and called this file from the exit plug of the window. Even this doesn't work.
       Can someone suggest me some way out.
       Thanks in advance. Will reward points for helpful answer.
    Regards
    Mukesh

    Hi Mukesh,
    so many times it has been asked...
    see blog
    /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications
    Regards
    Anuj

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

Maybe you are looking for

  • Error message from itunes setup assistant

    When I open iTunes to sync my iPod-Touch, I get an error message regarding the registry and suggest that I re-install iTunes. Message: Warning. The registry settings used by the iTunes drivers for importing and burning CD's and DVD's are missing. Thi

  • Reader insists on printing 2 pages per sheet

    Reader 11.0.10 I cannot set it to print 1 page per sheet. Other programs are happy with one, or multiple pages per sheet. But not Adobe Reader. Printer is Fuji Xerox CM205FW. Thanks in advance Peter

  • Custom document number at UpdateHistoryAction

    Hi We are using SAP B2B application with ECC. Whenever the Update History Action action is called and History is saved , we wish to pass custom document number. Just want to understand how can we achieve this..... Regards Sumit

  • CAN CONVERTER

    Bonjour, Suite au probléme rencontré ("can converter error : invalid number of data bytes") pour convertir mes  fichier de type "vector ASCII" (.asc) avec ma bus database configuration (.dbc), sujet du 02-07-2011, votre réponse en message privé été: 

  • Change calendar color-- missing popup

    I have followed the directions for changing the Calendar in Help.  My problem is that most of the time I don't get the color popup menu in the Get Info dialog box.  I do get it occasionally, but I can't seem to isolate what I do that makes the popup