使用struts1.x链接标记提交表单

时间:2015-08-24 06:22:59

标签: java forms struts-1

我无法使用struts 1.x

中的<html:link>标记提交表单

这是我的情况:

 <html:form action="">
  <table>
   <tr>
    <td>
       <html:text property="firstName"></html:text>
    </td>
    <td>
       <html:text property="lastName"></html:text>
    </td>
    <td>
       <html:text property="middleName"></html:text>
    </td>
    <td>
       <html:text property="worstName"></html:text>
    </td>
    <td>
       <html:text property="goodName"></html:text>
    </td>
   </tr>
</table>
  <html:link action ="/someAction.do" >I am link </html:link>
</html:form>

在我的struts-config.xml我配置了表单和操作

   <form:bean name="someForm"  class="someformclass">
     </form:bean>  
   <action name="someForm" path="/someAction" class="someactionclass">
      //some forwardings.
   </action>

但是这里的事情是我无法在我的表单对象中获取那些表单数据(即所有这些名称),我得到的只是空白。

<html:link action="someAction">代码是否应该带form data

如果是,那么<html:link href="someLink">之间有什么区别?

如果我想用<html:link >标签提交带有java脚本的表单,我将如何实现?

0 个答案:

没有答案