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

WBOY
Release: 2016-06-24 11:44:29
Original
1215 people have browsed it

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>
Copy after login

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>
Copy after login

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>
Copy after login

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template