You might try something like this:
- (void)appendToResponse:(WOResponse *)aResponse inContext:(WOContext *)aContext {
NSData *htmlData = [NSData
dataWithContentsOfFile:@"/docs/Documents/HTML/TECH/doctest1.htm"];
[super appendToResponse:aResponse inContext:aContext];
[aResponse setContent:htmlData];
}
or
- (void)appendToResponse:(WOResponse *)aResponse inContext:(WOContext *)aContext {
id d = @"<HTML><HEAD></HEAD><BODY>Boo!</BODY></HTML>";
[super appendToResponse:aResponse inContext:aContext];
[aResponse setContent:[d dataUsingEncoding:NSASCIIStringEncoding]];
}
Ian
[EMAIL PROTECTED] wrote:
> All:
> I have a static HTML prototype of site. I'm building the dynamic webobjects
>version now. I want to use statci HTML from the prototype as placeholders for
>components I haven't built yet. Is there an easy way to pass chunks of static HTML,
>stored in flat files through WebObjects, and on to the browser? The only way I have
>found to do it is to use WOString and write a function to open the contents of the
>file and read it into a NSString.
>
> Kyle
>
> Kyle Kelliher
> Director of Technology
> hooloo.com
> 718-352-8301
> 718-352-6202 (fax)
> [EMAIL PROTECTED]