Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > disable or disappear window's close button (JSP)

Reply
Thread Tools

disable or disappear window's close button (JSP)

 
 
Vijaya
Guest
Posts: n/a
 
      02-16-2004
I need to force the user to click the sign out button to close the
window, that's cause i need to kill his session and when i do that on
the onload of the body sometimes don't execute the method (javascript)
that goes to the servlet that kill the session.

Even if there is an server side event in Java, that will also be
helpful. I am using Tomcat as the server.
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      02-16-2004
Vijaya wrote:

Hi Vijaya, there is no such group as..
comp.lang.java.javascript, you may have confused
it with comp.lang.javascript - a seperate language
to Java.

> I need to force the user to click the sign out button to close the
> window,


Easy. Stand beside them with a
loaded gun. Say "Close that, and
I'll shoot you".

>..that's cause i need to kill his session


...a 'men only' site?

There are probably good ways to
achieve what you want, but you are
pursuing the wrong strategy if it ever
depends on actions by the user.

Any such strategy *will* *fail*.

[ And btw - anything involving JavaScript
cannot be relied upon either. ]

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology


 
Reply With Quote
 
 
 
 
riotctrl
Guest
Posts: n/a
 
      02-25-2004
As an idea... an Onunload call might work to close the session also if they
close the window down.


"Vijaya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I need to force the user to click the sign out button to close the
> window, that's cause i need to kill his session and when i do that on
> the onload of the body sometimes don't execute the method (javascript)
> that goes to the servlet that kill the session.
>
> Even if there is an server side event in Java, that will also be
> helpful. I am using Tomcat as the server.



 
Reply With Quote
 
Tony Morris
Guest
Posts: n/a
 
      02-25-2004


"riotctrl" <(E-Mail Removed)> wrote in message
news:iBW_b.611212$X%5.303990@pd7tw2no...
> As an idea... an Onunload call might work to close the session also if

they
> close the window down.
>
>
> "Vijaya" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > I need to force the user to click the sign out button to close the
> > window, that's cause i need to kill his session and when i do that on
> > the onload of the body sometimes don't execute the method (javascript)
> > that goes to the servlet that kill the session.
> >
> > Even if there is an server side event in Java, that will also be
> > helpful. I am using Tomcat as the server.

>
>


Impossible.
There is no way to force a client to close their session - and to rely on
such behaviour is a flawed approach.
If you want to handle the case of a session closing (either manually or
timing out), see javax.servlet.http.HttpSessionListener.


--
Tony Morris
(BInfTech, Cert 3 I.T.)
Software Engineer
(2003 VTR1000F)
Sun Certified Programmer for the Java 2 Platform (1.4)
Sun Certified Developer for the Java 2 Platform


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IƱaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
Gmail: the Back button (vs. Close button)...onBeforeUnload? allan.young@gmail.com Javascript 5 03-22-2007 09:50 PM
Disable close button in management window.(KDE- pyQT) Gabriel - BR Python 4 08-25-2006 07:33 PM
Outlook Express Messages Disappear, Bookmarks in Internet Explorer Disappear rchrdcarlisle@NOTyahoo.com Computer Support 19 07-30-2006 09:41 PM
ASP.Net Code to make Input button disappear immediately Colin Graham ASP .Net 3 12-16-2004 11:20 AM



Advertisments