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 <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Newsgroups: ml.apache.modperl > Subject: Re: Apache::Sandwich, etc > > >>>>> "JG" == Jie Gao <[EMAIL PROTECTED]> 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