Re: Re(2): SSI within main.html
Re: Re(2): SSI within main.html
- Subject: Re: Re(2): SSI within main.html
- From: Chuck Hill <email@hidden>
- Date: Wed, 21 Jan 2004 11:37:03 -0800
Below is also what I did (also in 4.x). One thing to note is that this
depends on the order of module loading. IIRC, they are executed in the
opposite order they are included in the conf file. So if using
mod_webobjects, this needs to come before mod_ssi in the config file.
Here is an alternative you might want to investiagate (orginally from Pete
Fournier, peterfournier at fournierware.com):
-----
If the static site and the WO App are on the same server you can use SSI.
If they are not on the same server you can use direct actions and return
your data in the form of
document.write("some html to embed on a page");
You would call your direct actions like this from any HTML where the client
browser can see your webserver:
<SCRIPT
SRC=\"http://<webdomainhere>/scripts/WebObjects.dll/<appnamehere>.woa/wa/Pag
eCounter/hits?format=js&url='http://www.domain.com/somepage.html'"></SCRIPT>
I have used this and IFRAMEs with success to embed WO app output into
exteral sites and other applications. Just use multiple direct actions and
arguments on the URL to indicate what data to pull.
This particular example comes from a page counter application I wrote. It
is dependent upon JavaScript, but works well.
-----
Chuck
At 09:56 AM 21/01/2004 -0500, Chris Whatley wrote:
>> On Sun, Jan 18, 2004, Chuck Hill wrote:
>>
>>> Yes. You can include HTML generated by WO into static pages (direct
>>> actions are easiest). But including static HTML files into the
>>> result of a cgi call is not supported by Apache.
>>
>> Chuck,
>>
>> Can you point to an example of how to include the HTML generated by WO
>> into static pages served on Apache. Our site is comprised of hundreds
>> of
>> ssi includes, and I would like to use WO to generate some dynamic
>> tables
>> to be included in those pages--course schedules and such. I really
>> don't
>> want to generate the whole page in WO if I can include just the course
>> schedule table from WO.
>
>E.g.:
>
> <!--#include virtual="/cgi-bin/WebObjects/Foo.woa/wa/doSomething"-->
>
>I haven't done this since WO 4.X, but under that version, mod_include
>would pass the request in to the app with a mangled URI, so we had to
>write a direct action request handler that demangled the URL before
>processing the request. Maybe 5.X and a more recent apache combo won't
>have the same issue.
>
>Chris Whatley
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.