You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sekhar_k1978 <se...@yahoo.com> on 2005/03/15 12:02:34 UTC
Assets handling if images stored inside WEB-INF.........
Hi,
Asset is not working for me.... The way i am following is as follows...
Before i go forward let me know how u are handling assets.....????
I have a Home page where i am displaying an image....
The code in Home.html is:
<img jwcid="@Image" image="ognl:assets.imageAsset" alt="View My Image"/>
code in Home.page is: (here i have saved the image file in "WEB-INF/img" folder....i dont want to change the "img" folder from this place)
<private-asset name="imageAsset" resource-path="img/RajaSekhar.jpg"/>
If i am using privat-asset then page is not rendered and i am getting the below error:
Unable to instantiate component Home: null
<context-asset name="imageAsset" path="/WEB-INF/img/myimage.jpg"/>
If iam using context-asset then "the image is not displayed but the page is displayed properly"
when i see the source of the image then i am getting as:
http://localhost:8080/logintest/WEB-INF/img/myimage.jpg i guess this is not working since it is in WEB-INF folder.....
<context-asset name="imageAsset" path="img/myimage.jpg"/>
page is not rendered and the error i am getting is:
Unable to locate asset 'imageAsset' of component Home as context:/img/RajaSekhar.jpg.
I tried all the possibilities by changing the "path" i also tried to change the type of "ASSET".. I used all the 3 types of assets but it didn't worked....
the only way it is working right now for me is by direct giving the path of file:
<external-asset name="timage" URL="C:\myfolder\myimage.jpg"/>
I am sure, this is not the way every one will be using....
so let me know how to handle assets when they are inside the WEB-INF folder....
Thanks in advance,
Regards,
RajaSekhar.
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!