You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jie Gao <J....@isu.usyd.edu.au> on 2001/11/11 21:44:08 UTC

Apache::Sandwich, etc

Hi All,

I am wondering if it is possible to add a footer to dynamic pages,
server-wide, like the subject module does to static pages.

One apparent way to me is to add another content handler, but
I am not sure how that'll work.

Any suggestion is appreciated.





Jie


Re: Apache::Sandwich, etc

Posted by Jie Gao <J....@isu.usyd.edu.au>.
On Mon, 12 Nov 2001, Mark Maunder wrote:

> Jie Gao wrote:
>
> > Hi All,
> >
> > I am wondering if it is possible to add a footer to dynamic pages,
> > server-wide, like the subject module does to static pages.
> >
> > One apparent way to me is to add another content handler, but
> > I am not sure how that'll work.
> >
> > Any suggestion is appreciated.
> >
> > Jie
>
> When you say 'dynamic pages' what do you mean? Are you using standard
> CGI scripts under Apache::Registry? Or have you written your app as
> handlers?
>
> If you've written your app as a handler, then If you're going to use
> Multiple handlers that each contribute content to the final document
> (i.e. first hander processes the request and the second adds header and
> footer info), you should check out Apache::Filter.

On 12 Nov 2001, Vivek Khera wrote:

> Date: 12 Nov 2001 12:26:41 -0500
> From: Vivek Khera <kh...@kcilink.com>
> To: modperl@apache.org
> Newsgroups: ml.apache.modperl
> Subject: Re: Apache::Sandwich, etc
>
> >>>>> "JG" == Jie Gao <J....@isu.usyd.edu.au> writes:
>
> JG> I am wondering if it is possible to add a footer to dynamic pages,
> JG> server-wide, like the subject module does to static pages.
>
> Apache::Sandwich will work with whatever content handler you want,
> including dynamic ones.  See the docs.

What I am trying to do is to add a footer to the _html_ output by perl
scripts running under perl_run. After delving into the camel book, I found
I could try "stacked handler pipelining". I need to find out first what
content type the script output is, and if it is html, the footer will
be added. I'll give the idea a go now.

Thanks for the replies.

Regards,



Jie


Re: Apache::Sandwich, etc

Posted by Mark Maunder <ma...@swiftcamel.com>.
Jie Gao wrote:

> Hi All,
>
> I am wondering if it is possible to add a footer to dynamic pages,
> server-wide, like the subject module does to static pages.
>
> One apparent way to me is to add another content handler, but
> I am not sure how that'll work.
>
> Any suggestion is appreciated.
>
> Jie

When you say 'dynamic pages' what do you mean? Are you using standard
CGI scripts under Apache::Registry? Or have you written your app as
handlers?

If you've written your app as a handler, then If you're going to use
Multiple handlers that each contribute content to the final document
(i.e. first hander processes the request and the second adds header and
footer info), you should check out Apache::Filter.





Re: Apache::Sandwich, etc

Posted by Vivek Khera <kh...@kcilink.com>.
>>>>> "JG" == Jie Gao <J....@isu.usyd.edu.au> writes:

JG> I am wondering if it is possible to add a footer to dynamic pages,
JG> server-wide, like the subject module does to static pages.

Apache::Sandwich will work with whatever content handler you want,
including dynamic ones.  See the docs.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/