By "during start-up" you mean Apache before-forking startup, I assume, so
you don't have a request object yet, which is why $m->current_comp returns
nothing.

Apache itself doesn't know where the file is until it is actually
requested, so you would probably have to dig through the filesystem
somehow to find a file that looks like yours.

I'm not sure why you would need to do this during server startup, but you
could try:

1.  Just call $m->current_comp->path when the component is requested.
It's very low-overhead.

2.  The comp_root might be helpful as a starting place for digging:
$m->interp->comp_root or $ah->interp->comp_root

3.  Tell us more about where and when this code is being executed so we
can give you more suggestions.

~ John Williams


On Tue, 29 Aug 2006, mama wrote:

> Hello,
>
> I try to determine the path of my autohandler during start-up. This is
> necessary if someone else will deploy my app with another directory
> structure than I use.
>
> Now two possibilities come into my mind:
>
> 1: getcwd(), returns /
> 2: $m->current_comp->path, but $m->current_comp doesn't return anything.
>
>
> I know, this is maybe a dumb question, but I don't have any idea.
>
> Thanks for your help
>
>
> -------------------------------------------------------------------------
> 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
>


-------------------------------------------------------------------------
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

Reply via email to