<img src="<bean:write name="element" property="path" /> " />

解决方案 »

  1.   

    这样用不了,我试过了
    显示不出来图片的
    <img src=" <%= session.getAttribute("pathPhoto")%>" />就可以显示
    继续啊
    用javascript赋过去也行啊
    会的帮帮忙了
      

  2.   


    <img src="<bean:write name="element" property="path" />">这样,用不了吗??不行的话换成单引号试试<img src='<bean:write name="element" property="path" />'>前提是你要确定<bean:write>有东西
      

  3.   

    你先看看你<bean:write name="element" property="path" />里面有东西没有
    如果没有,当然显示不出来
    如果有<img src=" <bean:write name="element" property="path" />  " /> 这样写没有问题
      

  4.   

    src的东西用单引号括起来就没有问题
      

  5.   

    <img src="  <bean:write name="element" property="path" />   " />
    这样写我觉得不对,因为",'应该互相嵌套,不过貌似struts的标签并不好用
      

  6.   

    <img src="<bean:write name='element' property='path' />  " /> 
      

  7.   

    <img src="<bean:write name='element'property='path'/>" />
    就这样没错啊
      

  8.   

    实在不行,想想别的办法啊。比如把<bean:write name='element'property='path'/> 保存在js变量中,动态设值到src中