DispatchAction

来源:互联网 发布:常见心理疾病 知乎 编辑:程序博客网 时间:2024/05/24 05:11

1、编写Action,继承自DispatchAction

将execute方法改为其他名字

2.struts-config.xml中的<action标签中加入一个请求参数parameter="名字aaa"

3.jsp页面中增加一个隐藏域,里面也有一个请求参数:

<html:form  action="...">

    <input type="hidden"  name="名字aaa"  value="action中的某个方法名"

</html:form>


错误写法:url?opType="findAll"

正确写法:url?opType=findAll


原创粉丝点击