<html:img src="../images/update.gif" border="0" />在这里images目录是跟WEB-INF同级的

解决方案 »

  1.   

    struts里面用图片没有多大的意义。
      

  2.   

    我要的是actionForm里的值
    比如在form里面有
    String imgPath;
    public void setImgPath(String path){}
    pubic String getImgPath(){}我怎样在structs <html:img > 里使用imgPath
      

  3.   

    你看这样行不?在你的Action中
    httpServletRequest.setAttribute("actionForm",actionForm);
    在JSP叶面中
    <%
    actionForm curractionForm=null;
    curractionForm=(actionForm)request.getsetAttribute("actionForm");
    %>
    <html:img src="../images/<%=curractionForm.getImgPath()%>" border="0" />