<html:form/>中究竟有没有name这个属性? 没有,其实formname就是你在config里写的那个名字 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <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你可以下载最新的版本! newmeteor(圆缘):你到Apache的网站去看看:http://struts.apache.org/userGuide/struts-html.html这上面都没说有name这个属性! 没有这个属性的啊,name可以用你写 的actionForm代替啊(如果你没有自己指定过的话),比如<html:form action="addDeviceAction.do" method="post"/> 那样的话,你要用name其实就是"addDeviceActionForm" 就相当于 <form name="addDeviceActionForm" action="addDeviceAction" method="post"> <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就什么问题也没有了。 上面的那段代码是我从Mastering Jakarta Struts中考下来的源代码。顺便给那本书作一下广告,呵呵!Mastering Jakarta StrutsJames GoodwillWiley Publishing, Inc.Publisher: Robert IpsenCopyeditor: Elizabeth WelchEditor: Robert M. ElliottProofreader: Nancy SixsmithManaging Editor: John AtkinsCompositor: Gina RexrodeBook Packaging: Ryan Publishing Group, Inc.Technical Editor: Avery RegierDesignations used by companies to distinguish their products are often claimed as trades. In allinstances where Wiley Publishing, Inc., is aware of a claim, the product names appear in initialcapital or all capital letters. Readers, however, should contact the appropriate companies for morecomplete information regarding trades and registration.Copyright © 2002 by Wiley Publishing, Inc. All rights reserved.Published by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in Canada. 遇到类似这种问题,你可以直接查一下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属性了吧如果自定义过标签就会清楚这个文件的使用 新闻发布系统数据库设计 struts标签库用的多吗? java里html解析类 hibernate一对多或者多对一的映射文件要注意什么问题? 如何在Struts用DataSource? 如何在weblogic9.0上配置jndi !!jboss-tomcat 重新启动后,jsp如何能不重新编译? 高分,有实际EJB开发经验者请进!!! 紧急求助!我的网页为什么显示不了java applet效果??? servlet请求重定向中参数的传递: jbuilder2005怎么生成jar文件 请教现在上PROJECT用JSF怎么样?JSF是否适合数据为中心处理的界面
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
你可以下载最新的版本!
你到Apache的网站去看看:
http://struts.apache.org/userGuide/struts-html.html
这上面都没说有name这个属性!
<html:form action="addDeviceAction.do" method="post"/> 那样的话,你要用name其实就是
"addDeviceActionForm" 就相当于 <form name="addDeviceActionForm" action="addDeviceAction" method="post">
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就什么问题也没有了。
源代码。
顺便给那本书作一下广告,呵呵!
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 © 2002 by Wiley Publishing, Inc. All rights reserved.
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada.
例如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属性了吧如果自定义过标签就会清楚这个文件的使用