您的位置:程序门 -> java -> web 开发



struts标签,图片显示(非二进制图片)


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


struts标签,图片显示(非二进制图片)
发表于:2008-01-22 20:31:39 楼主
我将图片得相对路径存储在数据库中,通过action,现在用 <bean:write> 能够在jsp页面中显示出那个路径(如“/pic/1.jpg”),
因为我现在用得是一个标签,是通过 <logic:iterate> 显示数据库中得相关数据,
现在就是能显示文字等等,但是我通过 <bean:write> 只能得到图片得路径啊,
通过怎样得标签能显示图片呢?例如 <html:img   page="/pic/1.jpg"> ,当然"/pic/1.jpg"是要通过javabean传过来得。

我的部分代码如下:
<logic:iterate   id="aclasses"   name="catalog"   >                         //catalog是通过request传过来得list;        
    <td》
<bean:write   name="aclasses"   property="catname"   />  
<bean:write   name="aclasses"   property="phonename"   />  
                <bean:write   name="aclasses"   property="phonetype"   />  
                <bean:write   name="aclasses"   property="memberprice"   />  
                <bean:write   name="aclasses"   property="picshow"   />     //这样处理,能显示其相对路径   "/pic/1.jpg"
                <html:img   page=""/>
    </td>
  </logic:iterate>

不知     <html:img   page=""/>     这边如何写一下。


快速检索

最新资讯
热门点击