On Mon, 05 Sep 2005 10:03:09 -0400, Joe Trewin <[EMAIL PROTECTED]> wrote:
For anyone else trying to do something similar, I eventually solved this
by doing the following:
ContextResource resource = new ContextResource(servletContext,
"myfile.gif");
IAsset asset = new ContextAsse
most of the
time).
Am I doing this correctly, or is there (or should there be) a better way
of getting handles to things like this?
-Original Message-
From: Joe Trewin [mailto:[EMAIL PROTECTED]
Sent: 05 September 2005 12:05
To: Tapestry users
Subject: RE: Creating an IAsset in code
doc, although it
exists in the project.
-Original Message-
From: Geoff Longman [mailto:[EMAIL PROTECTED]
Sent: 31 August 2005 17:56
To: Tapestry users
Subject: Re: Creating an IAsset in code from a context image
public IAsset createAsset(ServletContext context, String path) {
Thanks Geoff - just the ticket.
-Original Message-
From: Geoff Longman [mailto:[EMAIL PROTECTED]
Sent: 31 August 2005 17:56
To: Tapestry users
Subject: Re: Creating an IAsset in code from a context image
public IAsset createAsset(ServletContext context, String path) {
return new
public IAsset createAsset(ServletContext context, String path) {
return new ContextAsset( new ContextResourceLocation(context, path), null);
}
there you go.
Geoff
On 8/31/05, Joe Trewin <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm tring to do a very simple thing, so I'm obviously missing somethin