I need to access the James server's org.apache.avalon.phoenix.BlockContext and 
org.apache.avalon.framework.context.Context from a Mailet to access sub-directories 
off the base directory of the sar.  These sub-directories would be described in the 
james-config.xml to initialize the mailet, but I've been unable to determine how to do 
this.

I'd like to configure the mailet to open files from two paths as described by 
"applePath" and "orangePath" like so:

<mailet match="RecipientIs=account@localhost"
class="myMailet">
  <applePath>file:///apple</applePath>
  <orangePath>file:///orange</orangePath>
  <loggingFilename>file:///logs/myMailetLog.txt</loggingFilename>
</mailet>      

And then in the mailet's init method correct for the base directory of the sar like 
so: 

String applePath = getInitParameter( "applePath" );
applePath= applePath.substring("file://".length());
applePath = ((BlockContext)context).getBaseDirectory() + File.separator + applePath;

Please, any pointers?

-Michael



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to