Assuming you're writing in server-side Java, you'd want to create a custom Command implementation to do this. Take a look at the implementation of the BrowserRedirectCommand:
Your client-side script would just call window.close().
The one caveat is that most all browsers won't close a window/tab that you did not programmatically open. So unless you invoked window.open() previously to create the window, you're not allowed to close it.
Assuming you're writing in
Assuming you're writing in server-side Java, you'd want to create a custom Command implementation to do this. Take a look at the implementation of the BrowserRedirectCommand:
https://svn.nextapp.com/svn/echo3/trunk/src/server-java/webcontainer/nextapp/echo/webcontainer/command/BrowserRedirectCommand.java
and its peer:
https://svn.nextapp.com/svn/echo3/trunk/src/server-java/webcontainer/nextapp/echo/webcontainer/sync/command/BrowserRedirectCommandPeer.java
and its client-side script:
https://svn.nextapp.com/svn/echo3/trunk/src/server-java/webcontainer/nextapp/echo/webcontainer/resource/RemoteClient.BrowserRedirect.js
Your client-side script would just call window.close().
The one caveat is that most all browsers won't close a window/tab that you did not programmatically open. So unless you invoked window.open() previously to create the window, you're not allowed to close it.