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
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.