On 8/6/01 8:30 AM, "Scott Eade" <[EMAIL PROTECTED]> wrote:
> Any chance of a replay to my post of 1 week ago?
In 2.1 use the TurbineServletService to gain access to server information
from code that has no access to RunData. Take a peek at the TurbineServlet
static helper to get what you need.
> Thanks,
>
> Scott
>
> ----- Original Message -----
> From: "Scott Eade" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 29, 2001 12:56 PM
> Subject: ScheduledJob & Application tools
>
>
>> I'm writing a ScheduledJob that is going to send email to users.
>>
>> The email needs to contain strings from UIManager and URLs
>> that I would normally generate using $link.
>>
>> The trouble is that because I will be sending these messages
>> from a ScheduledJob, data & context are not available.
>>
>> It looks like I can create a context to pass to VelocityEmail
>> by going:
>>
>> Context context = TurbineVelocity.getContext();
>>
>> and I can get a UIManager using:
>>
>> UIManager ui = new UIManager();
>> ui.init(null);
>> ui.setSkin(); // will use TR.props
>>
>> but I am not sure about TemplateLink as with no RunData
>> available I really need a ServletData instance in order to
>> initialise the TemplateLink instance.
>>
>> TemplateLink link = new TemplateLink(ServletData);
>>
>> The only way I can see to get a ServletData object in order
>> to be able to correctly initialise TemplateLink is to repeat
>> a bunch of code from TurbineRunDataService - I can do
>> this, but it seems like I am doing too much and that there
>> must therefore be an easier way.
>>
>> Does what I am doing make sense or am I barking mad?
>>
>> Any help would be appreciated.
>>
>> Scott
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]