New Message: Re: What Is Static Rendering?

dbayly at udena.ch dbayly at udena.ch
Sun Oct 7 01:09:36 PDT 2001


Hi Tommy,

Well first thing let me says that metadata and static rendering are 
not necessarily incompatible, as some of my clients am using it 
extensively. For example see dynamic[1] and static pages [2]. In this 
example, the static machine is a Unix host, not running Manila many 
tcp hops away from the dynamic server - a Mac.

When Manila discovers that it needs to do a static render, it already 
has a page table. It will need a different page table to do the 
static render, so it saves a copy  and when the static render is done 
, it restores that copy. See  for example in 
manilaSuite.staticRendering.displayRenderButton, the code under
bundle //handle actually rendering the page, if this is a post

Now the problem is this, if something goes wrong in the static render 
the page table is wrong, and Manila's error message usually refers to 
something like, Cant find a table called pt.

So first self help step to investigate what is really going wrong is 
to make the static render part of a try and to restore the original 
page table before trying to report the error.  I did this briefly a 
long time ago, while I debugged the real problems and this is 
something like what I did.

>bundle { //handle actually rendering the page, if this is a post
>	if string.lower (pta^.method) == "post" {
>		if defined (pta^.postArgs.renderThisPage) {
>			local (oldPta = pta);
>			html.deletePageTableAddress ();
>			try {
>				local (pt);
>				pt = 
>manilaSuite.staticRendering.renderPage (relativePath, 
>pta^.adrSiteRootTable);
>				html.setPageTableAddress (oldPta);
>				«Weird, but a delay is needed for the 
>sake of the static server.
>				clock.waitSeconds (1);
>				mainResponder.redirect (pt.url);
>				scriptError ("!redirect " + pt.url)}
>			else {
>				local (err = tryError);
>				html.setPageTableAddress (oldPta);
>				scriptError("Static render failed 
>because " + err)}}}}


You can find the results of my subsequent researches into static 
rendering at [3]



[1] <http://www.udena.ch:8080/glasgowWestEnd/>
[2] <http://www.glasgowwestend.co.uk/>
[3] <http://www.baylys.com:8080/patches/manilasuite/staticrendering/>

>  When I setup static rendering using 
>manilaSuite.staticRendering.renderPage it conflicts with the 
>metaData plugin (it seams that in the pagefilter the metadata plugin 
>can't find the correct pagetable or thread).
>
>  I suspect that the static rendering has to be wrapped in something 
>that resurrects the initial pagetable. And I also suspect this is 
>what manilaSuite.staticRendering.startRenderSession and 
>manilaSuite.staticRendering.endSinglePageSession are suposed to do. 
>But I don't have any success using them.
>
>  Anyone with experience to share?
>
>  /Tommy
>

-- 

- David Bayly.       Programmer and digest reader.     dbayly at udena dot ch
  		Digest Readers do it once a day.




More information about the Frontier-Server mailing list