无法在网格中显示jpeg图像(html)

时间:2012-01-17 19:35:54

标签: image java-ee src tapestry

我有一个带有属性图片的对象资源。

如果在我的网格中,我会这样做:

<p:pictureCell>
    <img src="${context:/css/images/pic.jpg}" width="110" height="80" />
</p:pictureCell>

我可以显示图片。但是,如果我试图从对象中获取它,我就不能

<p:pictureCell>
    <img src="${resource.picture}" width="110" height="80" />
</p:pictureCell>

我该怎么做?

1 个答案:

答案 0 :(得分:1)

我找到了对我问题的回应:

我必须这样做:

<p:pictureCell>
    <img src="${context:}${resource.picture}" width="110" height="80" />
</p:pictureCell>

我希望它有助于某人