struts应用中html的Form,Struts的Action、Form三者是如何对应上的?
通过jsp(html)中的form的action属性对应到struts-config.xml中的action-mappings,再根据那个action-mappings的name属性对应到form-beans中的action,下图中的颜色代表对应关系
(jsp中)
<form method="post" action="/example.do">
<form method="post" action="/example.do">
(struts-config.xml中)
<action name="exampleActionForm" path="/example" type="com.hdpan.action.ExampleAction">
<form-bean name="exampleActionForm" type="com.hdpan.form.ExampleActionForm">
[@more@]