(fwd) Re: Mosaic Problem

Sorry to forward my own message; I didn't send it to the list by
mistake.

------- Forwarded Message

From: anto@w3.org (Antonio Ramirez)
To: hvram@wipinfo.soft.net (HariharaVinayaka Ram)
Subject: Re: Mosaic Problem 
In-reply-to: Your message of "Tue, 09 Jul 1996 19:38:01 +0500."
             <9607091438.AA04404@rolex.rnd.blr> 
Date: Tue, 09 Jul 1996 11:22:18 EDT
Sender: anto


#.
> 
> 	I tried to use :
> 
> 	Reply reply = request.makeReply(request.getClient());
>         reply.setLocation("http://www.yahoo.com/index.html");
> 	return reply;
> 
> And I got a error message "Document contains no data".
> 
> Any ideas how to make the status code not appear
> Regards
> - Hari

I use this, and it seems to work (sort of):


	Reply reply = request.makeReply(HTTP.MOVED_TEMPORARILY);
	reply.setLocation(URL);
	
	HtmlGenerator g = new HtmlGenerator("Document moved");
	g.append("<h1>Document Moved</h1>"+
		 "<p>This document has moved "+
		 "<a href=\"" + URL +"\">here</a>.<p>");
	reply.setStream(g);
	return reply;

Apparently Mosaic doesn't like content-less documents. A browser that
supports redirection will not show the content of the reply.  The
"sort of" is that the URL that can be used in setLocation has to be an
absolute URL. (Netscape doesn't mind relative URL's there, but Mosaic
does).

- --
======================================================================
Antonio Ramirez / 450 Memorial Dr. / Cambridge, MA 02139
anto@mit.edu, anto@w3.org

"A fairy had granted him the gift of opening any dictionary exactly at
the page on which the seeked word was to be found." -- Julio Torri

------- End of Forwarded Message

Received on Tuesday, 9 July 1996 11:26:02 UTC