Hi,

I am using JBoss and not Tomcat, but the context path is about the same.
This is what I used:
public IAsset getCategoryAsset() {
String path = CategoriesUtil.getCategory(getCategoryId())
.getAssetPath(); <----------------------------------------------- return images/blabla.gif


       return new PrivateAsset(new ClasspathResourceLocation(
               new DefaultResourceResolver(), path), null);
   }
And the HTML is:
...
<img jwcid="@Image" image="ognl:categoryAsset" alt="ognl:categoryName"/>
...

In your case, that should be "images/0.gif".

David Joffrin
http://www.bidnplay.com

From: Kent Tong <[EMAIL PROTECTED]>
Reply-To: "Tapestry users" <[email protected]>
To: [email protected]
Subject: Re: external-asset
Date: Fri, 8 Apr 2005 04:51:57 +0000 (UTC)

Deepak Suldhal <dtapehistory <at> yahoo.com> writes:
> I want to try
> <external-asset name="wrong_0"
> URL="file:///C:/jakarta-tomcat-5.0.28/webapps/hangman2/context/images/0.gif">
> </external-asset>


> But this is giving error, its requesting the classpath for the component.

What is the exact error message and stack trace?

BTW, the attempt to use external url is futile because
by default browsers will not display local contents
(see
http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don't_Work).


--------------------------------------------------------------------- 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]



Reply via email to