This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am new to JSP so I apologize if this is a trivial question. I have looked for an answer to this a fair bit and have experimented to try to see if I could get it to work but am still unable to. What I want to do is close the main application (brower) window for my JSP system when the user selects logout form the navigation menu. What it does now is to inactivate the session (good) but it doesn't close the window. If the user clicks on another menu item, a "min-version" of the original login window pops up in the main frame (bad). The code for my logout is:
I know these are kludgey, especially because I've been hacking them for awhile so leftover stuff may still be in them. I borrowed the invalidate.jsp as a separate program idea from a former poster to this forum. I originally had it in my logout.jsp
Thanks very much in advance for any help. farmkitty
Would the browser type matter? I'm trying on MacOS X using Safari browser. My JSP backend is running on Solaris (Oracle database backend).
Thanks for the help. Let me think about that one because actually it just opens the initial window in the center frame of the application. This happens even if I just call the index.jsp from the tree.js menu item "logout". *sigh*
I just wish the session would invalidate AND the window would close. Otherqise, if the person logs on from the frame the application comes up with the main frame including a new small version of the side navigation menu. It's not usable. If they log out again and log back in, it makes a third version inside the outer two.
Joined: Sep 30, 2003
Oh, I just saw Bear's comment about clowsing the browser on the user. What I want to do is totally close the application if the user clicks on "logout" on the navigation menu (xtree.js). It would be ideal if they chose "logout" and it invalidated the session and then gave then the entire screen as a login as they see if they type the URL to log on in the first place but that's optional. The users are all the members of our lab ( about 20). I just want to be sure that they aren't still active in the application after they've logged out and also that they don't get a kludge of screen real estate with the old navigation menu on the left and successively smaller versions within the original.
Joined: Sep 30, 2003
In case I wasn't clear:
What I have at this point is a new window opening that allows users to login again and the page is fine (without frames). What I want to do is have the original window close (the one where they had logged out). The code I have is:
<%@ page language="java" %> <html> <head></head> <body on_Load="window.open('index.jsp?reason=nologin');mainframe.close();topframe.close();leftframe.close()"> <% %> </body> </html> (I had to add the underscore to the "onload" to be able to post this)
I even read something that made it sound like you couldn't close the original window
I hope that's not true.
Thanks very much for your help so far and your anticipated help.
Joined: Sep 30, 2003
Hi, does anyone know the answer to this one? My last message's question: Can the original window be closed? Thanks!
Hi. Have I asked this question in the wrong forum? I'm a beginner and I don't understand the latest response. Should I ask this in the beginner Java forum? If this is the right spot, would somebody be able to give me a code sample to help me close the original window (the new one displays the original non-frame login window), or, as the latest response suggests (sounds good but I don't know how to do it) - redisplay the contents of the first window without frames, just the original login window.
Yes, this is the right place. But to tell you the truth, I really have no idea what it is you are really trying to accomplish, and I don't have the time to go back and try to piece it all together from the previous reponses. Perhaps you can start out again and carefully describe your window and page hierarchies, and what it is you are trying to do with it. From previous discussions, I can't tell which windows and pages you are referring to in your questions. [ July 13, 2004: Message edited by: Bear Bibeault ]
Thanks again. Barbara
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com