Fortunately not.
Imagine anyone can rule to close your browserwindow.

But there is an alternative.
If you create an new window via JavaScript

window.open("newSite.jsp","newSite","height=400,width=400,...");

In that new window you can specify if it should close
and the user has no influence.

Greetings Alex

 +-----------------+
 | Alexander Meyer |
 +-----------------+--------------------------------+
 | Sponackerweg 54                                  |
 | 63808 Haibach                                    |
 |                                                  |
 | Tel. 0 60 21 / 61 05 35                          |
 | E-Mail [EMAIL PROTECTED]                        |
 | Homepage http://www.alexmeyer.org                |
 |                                                  |
 | Zertifikate:                                     |
 | Brainbench Certified Master Java Server Pages    |
 | (JSP 1.1) Developer                              |
 | Brainbench Certified Master PHP 4 Developer      |
 | Brainbench Certified Master JavaScript Developer |
 | Brainbench Certified Master HTML 3.2 Developer   |
 | Brainbench Certified Java 2 Developer            |
 | Brainbench Certified XML Developer               |
 | Brainbench Certified HTML 4 Developer            |
 | Brainbench Certified WWW Concepts Architect      |
 +--------------------------------------------------+


> -----Ursprüngliche Nachricht-----
> Von: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]Im Auftrag von
> [Mariano Pollio]
> Gesendet: Freitag, 9. März 2001 08:17
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: Urgent!!!
>
>
> oK,
>
> Using this mode me it has always given also in the past a message of alert
>  "Are you sure of close the window?" with the old browser.
> is there an other way?
>
> ------------------------
>   From: Alex Meyer <[EMAIL PROTECTED]>
>   Subject: AW: Urgent!!!
>   Date: Thu, 8 Mar 2001 18:28:52 +0100
>   To: [EMAIL PROTECTED]
>
>
> Yes, but only with an indirection.
> Because the servlet is processing on the server side.
> But closing the window is an client side action.
> You will need JavaScript
>
> response.getWriter().println("<script
> language='JavaScript'>self.close()</script>");
>
> Hope it helps.
>
> Greetings Alex
>
>  +-----------------+
>  | Alexander Meyer |
>  +-----------------+--------------------------------+
>  | Sponackerweg 54                                  |
>  | 63808 Haibach                                    |
>  |                                                  |
>  | Tel. 0 60 21 / 61 05 35                          |
>  | E-Mail [EMAIL PROTECTED]                        |
>  | Homepage http://www.alexmeyer.org                |
>  |                                                  |
>  | Zertifikate:                                     |
>  | Brainbench Certified Master Java Server Pages    |
>  | (JSP 1.1) Developer                              |
>  | Brainbench Certified Master PHP 4 Developer      |
>  | Brainbench Certified Master JavaScript Developer |
>  | Brainbench Certified Master HTML 3.2 Developer   |
>  | Brainbench Certified Java 2 Developer            |
>  | Brainbench Certified XML Developer               |
>  | Brainbench Certified HTML 4 Developer            |
>  | Brainbench Certified WWW Concepts Architect      |
>  +--------------------------------------------------+
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]Im Auftrag von
> > [Mariano Pollio]
> > Gesendet: Donnerstag, 8. März 2001 12:10
> > An: [EMAIL PROTECTED]
> > Betreff: Urgent!!!
> >
> >
> > Hi,
> > My problem is close window browser with (HttpServletResponse) response.
> >
> > Is this possible ?
> >
> >
> > :-)
> >
> > __________________________________________________________________
> > _________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ---------------End of Original Message-----------------
>
> --------------------------------------------------------
> Name      : Pollio
> E-mail    : [EMAIL PROTECTED]
> Home page : http://www.geocities.com/mpollio/
> Wap       : http://www.geocities.com/mpollio/index.wml
> Date      : 03/09/2001
> Time      : 08:17:27
> --------------------------------------------------------
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to