Heim >Web-Frontend >HTML-Tutorial >关于struts中的表单元素- Form bean not specified on mapping for action: "helloa.do"报错_html/css_WEB-ITnose

关于struts中的表单元素- Form bean not specified on mapping for action: "helloa.do"报错_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 11:44:291269Durchsuche

今天测试struts时仿照书上写了一个小的表单提交代码

1 <html:form action="helloa.do" method="post">2         <html:submit value="提交"></html:submit>3     </html:form>

报 Form bean not specified on mapping for action: "helloa.do"错。

struts-config.xml中的配置如下:

<action-mappings> <action path="/helloa" type="action.HelloAction" scope="request" input="success.jsp"> <forward name="s" path="/success.html"/> </action> </action-mappings>

这里没有用到ActionForm,所以没有加name属性,这个应该没有什么影响。

后来更改前台代码如下:

 <form action="helloa.do" method="post">        <html:submit value="提交"></html:submit>    </form>

 

 页面成功跳转,可能是

标记的原因,遂此记。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn