没有,其实formname就是你在config里写的那个名字

解决方案 »

  1.   

    <html:form action="Search.do"
    name="searchForm"
    type="com.wiley.SearchForm" >
    <table width="45%" border="0">
    <tr>
    <td>Search String:</td>
    <td><html:text property="searchString" /></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><html:submit /></td>
    </tr>
    </table>
    </html:form>
    有name属性的!推荐你一本介绍struts与struts比标签的好书,Mastering Jakarta Struts.pdf
    你可以下载最新的版本!
      

  2.   

    newmeteor(圆缘):
    你到Apache的网站去看看:
    http://struts.apache.org/userGuide/struts-html.html
    这上面都没说有name这个属性!
      

  3.   

    没有这个属性的啊,name可以用你写 的actionForm代替啊(如果你没有自己指定过的话),比如
    <html:form action="addDeviceAction.do" method="post"/> 那样的话,你要用name其实就是
    "addDeviceActionForm"  就相当于 <form name="addDeviceActionForm" action="addDeviceAction" method="post">
      

  4.   

    <html:form action="Search.do"
    name="searchForm"
    type="com.wiley.SearchForm" >
    <table width="45%" border="0">
    <tr>
    <td>Search String:</td>
    <td><html:text property="searchString" /></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><html:submit /></td>
    </tr>
    </table>
    </html:form>你先告诉我,我上面这几行,如果正确的,能不能满足你的要求!
    如果你和我说是的,能够满足你的要求的话!
    我建议你搜一下Mastering Jakarta Struts这本书她对struts标签
    有很详细的介绍!如果真的有问题的话,就是我手头上的资料,版本
    太旧,但是一般不会出现这种情况,都是向下兼容的阿!
    其实说实在的你在struts中配置一下formBean就什么问题也没有了。
      

  5.   

    上面的那段代码是我从Mastering Jakarta Struts中考下来的
    源代码。
    顺便给那本书作一下广告,呵呵!
    Mastering Jakarta Struts
    James Goodwill
    Wiley Publishing, Inc.
    Publisher: Robert Ipsen
    Copyeditor: Elizabeth Welch
    Editor: Robert M. Elliott
    Proofreader: Nancy Sixsmith
    Managing Editor: John Atkins
    Compositor: Gina Rexrode
    Book Packaging: Ryan Publishing Group, Inc.
    Technical Editor: Avery Regier
    Designations used by companies to distinguish their products are often claimed as trades. In all
    instances where Wiley Publishing, Inc., is aware of a claim, the product names appear in initial
    capital or all capital letters. Readers, however, should contact the appropriate companies for more
    complete information regarding trades and registration.
    Copyright &copy; 2002 by Wiley Publishing, Inc. All rights reserved.
    Published by Wiley Publishing, Inc., Indianapolis, Indiana
    Published simultaneously in Canada.
      

  6.   

    遇到类似这种问题,你可以直接查一下struts-html.tld文件,看看
    例如form标签的说明是<tag>
    <name>form</name>
    <tagclass>org.apache.struts.taglib.html.FormTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
    <name>action</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>enctype</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>focus</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>focusIndex</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>method</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>name</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>onreset</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>onsubmit</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>style</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>styleClass</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>styleId</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>target</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>type</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>可以看到有name属性了吧如果自定义过标签就会清楚这个文件的使用