Re: question on ERMailDeliveryHTML
Re: question on ERMailDeliveryHTML
- Subject: Re: question on ERMailDeliveryHTML
- From: email@hidden
- Date: Sun, 26 Apr 2015 00:53:30 +0200
ERMailUtils.instantiatePage calls the componentbs session() method which will create a Session.
What I used to do in a distant past was to create a component with the normal constructor and pass to this constructor a dummy WOContext. I was using this technique to send batches of emails in the background, so not triggered by any UI action. Below you see how I used to create such a dummy WOContext.
Hope this helps.
Rudi Angela
public WOContext dummyContext()
{
WOApplication app = Application.application();
String dummyUrl = app.cgiAdaptorURL() + "/" + app.name() + ".woa/wa/dummy";
WORequest request = app.createRequest("GET", dummyUrl, "HTTP/1.0", null, null, null);
WOContext context = app.createContextForRequest(request);
context._generateCompleteURLs ();
return context;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden