You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2002/07/05 18:01:49 UTC

Re: EmbperlObject calling order (was: Problems with embperl-2.0b8)

Hi,

the problem I see from your source is the following code
[-

$req = shift;

Execute ("main/index.html");

-]


This just inserts the content of main/index.html at the place you call
Execute. Execute will always only include the file you call. For the result
you want, you need a new http request. When when a new http request comes in
to main/index.html EmbperlObject will make sure that your main/content.epl
will be called, so you get the layout you want.

The create a new request, you can use a external redirect e.g.

[-
$http_headers_out{'Location'} = 'http://host/docroot/main/index.html' ;
exit ;
-]

Note: HTTP RFC requires a full URL here includeing the host, also most
browser will handle a path without host correctly.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org