Home  >  Article  >  Web Front-end  >  About form elements in struts - Form bean not specified on mapping for action: "helloa.do" error_html/css_WEB-ITnose

About form elements in struts - Form bean not specified on mapping for action: "helloa.do" error_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:44:291213browse

When I tested struts today, I copied a small form submission code written in the book

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

Reported Form bean not specified on mapping for action: "helloa.do "wrong.

The configuration in struts-config.xml is as follows:

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

ActionForm is not used here, so the name attribute is not added. This should have no impact.

The front-end code was later changed as follows:

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

The page jumped successfully, which may be due to the 4671253b45ddcbf6b4f1d1f6e293e659 tag. Hence this note.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn