On 8/21/06, Jeremy Blain <[EMAIL PROTECTED]> wrote: > Jay Truesdale wrote: >
> > > > Are there any complete code examples of this anywhere? I wrote my code > > based on the sample application in the Mason Book and there were no > > examples of using your own ApacheHandler object. > > A simple handler might look like this. Check the site docs for > more info. > > ----- > package My::ApacheHandler; > use strict; > use HTML::Mason::ApacheHandler; > > my $ah = HTML::Mason::ApacheHandler->new( > comp_root => '/webdata/', > data_dir => '/var/mason', > error_mode => 'fatal', > allow_globals => [ qw( %SESSION ) ], > ); > > sub handler { > my ($r) = @_; > > # do your session tying here > > > # handle the actual request > my $result = eval { > $ah->handle_request($r); > }; > if (my $err = $@) { > # do something with the error > # I have it logged and emailed > # with a rate limiter to prevent > # crazyness if things go to hell > } > > > # do session cleanup here > > > # return the result. > return $result; > } > > 1; > OK, I think I see what's going on in your example. So I'm guessing the handler goes in the mason root inside the syshandler? ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users