用image标签,是类型为图片的input的html元素
http://jakarta.apache.org/struts/userGuide/struts-html.html#image

解决方案 »

  1.   

    http://jakarta.apache.org/struts/struts-html.html
      

  2.   

    有没有使用的例子,我试了有些问题!可能是我的jsp结构嵌套太多了吧,希望baitianhai(hong) 给出个例子来,谢谢!
      

  3.   

    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page contentType="text/html; charset=GBK" %>
    <html:html>
    <head>
    <title><bean:message key="title"/></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#E1EBF4"  text="#000000">
    <html:form action="/checkAction.do" method="POST">
    <div align="center">
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td  height="10%">&nbsp;</td>
        </tr>
        <tr align="center">
          <td  height="20%"><h2><bean:message key="logon.title"/></h2></td>
        </tr>
        <tr>
          <td height="10%" >
            <hr width="80%">
          </td>
        </tr>
        <tr align="center">
          <td height="50%" >
      <p>&nbsp;</p>
              <p><html:hidden property="physicalIP" value="192.168.199.54"/></p>          <p>
                 <bean:message key="logon.username"/>
                 <html:text property="userName"/>
      </p>          <p>
                <bean:message key="logon.userpasswd"/>
                <html:password property="userPasswd"/>
              </p>
              <br>
              <p>
                <html:image src="common/enter.gif"/>
              </p>
              <p>&nbsp;</p>
              <p>&nbsp; </p>
          </td>
        </tr>
        <tr align="center">
          <td height="10%" ><hr width="80%">
            <font color="#CC0000">&copy;<bean:message key="Inc"/></font></td>
        </tr>
      </table>
     </div>
    </html:form>
    </body>
    </html:html>
      

  4.   

    可是我根据struts的Javadoc文档,给图片加上响应事件时,我的jsp页面出现异常,不显示内容,可能是响应事件有问题吧!
    有没有人做过啊
      

  5.   

    谢谢henryssss(henry)发给我的例子,给分