Great, that worked, thanks.
public EmailTemplate buildEmailTemplate(@Inject AssetSource assetSource)
throws IOException {
Asset asset = assetSource.getContextAsset("/templates/billing.stg", new
Locale("en"));
EmailTemplate emailTemplate = new
EmailTemplate(asset.getResource().op
On Thu, 15 Dec 2011 19:39:26 -0200, hese <1024h...@gmail.com> wrote:
Hi,
Hi!
public EmailTemplate buildEmailTemplate() {
InputStream is = ??
// I want to get a handle to a text file residing in my context path.
// obviously FileInputStream("/templates/billing.stg"); throws a file
@Inject AssetSource, and go from there. This should get you started.
On Dec 15, 2011, at 4:39 PM, hese wrote:
>
> Hi,
>
> I want to access a resource file from AppModule.java buildXXX method. Can
> anyone guide me how to go about it?
>
> public EmailTemplate buildEmailTemplate() {
>Input
Hi,
I want to access a resource file from AppModule.java buildXXX method. Can
anyone guide me how to go about it?
public EmailTemplate buildEmailTemplate() {
InputStream is = ??
// I want to get a handle to a text file residing in my context path.
// obviously FileInputStream("/tem