Never mind, answered my own question :p
For anyone else who may be curious the trick is:
response.setHeader("text/html", "content-type");
Best,
Jon
Begin forwarded message:
From: Jonathan Miller <[EMAIL PROTECTED]>
Date: October 17, 2007 2:41:39 PM HST
To: [email protected]
Subject: re: WOResponse & appendContentString
Hi,
I'm using a custom Request Handler that returns a JavaScript which
redirects the browser to a new page. In development mode this
works fine but when deployed instead of returning the javascript
the browser just prints it as text. Does anyone know what I'm
doing wrong?
CODE
if("Production".equals(System.getProperty("MODE"))) {
sb.append("<html><body><script type=\"text/javascript\">\n
\t")
.append("url = '").append(System.getProperty
("HTTP_SERVER")).append("/VideoLuna/WebObjects/VideoLuna.woa/wa/
videoManager?wosid=").append(wosid)
.append("';\n\t").append("window.location.replace(url);
\n</script></body></html>");
response.appendContentString(sb.toString());
}
Thanks in advance
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]