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

本文介绍如何在Struts框架中通过配置实现不同Action方法的调用,包括修改Action基类、配置struts-config.xml文件及JSP页面的设置。
1683

被折叠的 条评论
为什么被折叠?



