----- Original Message -----
From: Hai-Bang Pham <[EMAIL PROTECTED]>
> I was wondering if there is a way to hide the URL when trying to do
> a HTTP redirect.  I've experimented with the response.sendRedirect()
> method but the redirected URL is always shown.
<snip>

When clients use your web-based application, you could "launch" it into a
window that does not have a menubar, address bar, etc.  That way, the client
would never know what the URL is.

I use JavaScript to accomplish this:

var remoteURL = "<whatever you want>";
var remoteWindow;
var heightPad = 28;
var widthPad = 10;
var sysHeight = window.screen.availHeight;
var sysWidth = window.screen.availWidth;
var myWidth = 800 - widthPad;
var myHeight = 600 - heightPad;
var xcoord = (sysWidth - myWidth) / 2;
var ycoord = (sysHeight - myHeight) / 2;
var features = "toolbar=no,location=no,directories=no,status=no,menubar=no,"
+
               "scrollbars=yes,resizable=no,width=" + myWidth +
               ",height=" + myHeight + ",top=" + ycoord + ",left=" + xcoord;

// Make sure they can only open one window...
if((!remoteWindow) || (remoteWindow.closed)){
  remoteWindow = window.open(remoteURL, "WindowName", features, 1);
}
else{
  remoteWindow.location.replace(remoteURL);
  remoteWindow.focus();
}

This is probably only feasible for Intranet apps, though.  I don't know if
the general public is too keen on this sort of thing going on with their
client...

Shad

--
Shad J. Aumann
190 Earle Drive
North Kingstown, RI 02852
[EMAIL PROTECTED]

___________________________________________________________________________
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