public class TestAction extends org.apache.struts.action.Action{
public ActionForward execute(ActionMapping,mapping,ActionForm form,HttpServletRequest request,
HttpServletResponse response)
return mapping.findFormward("forward名称");
}
详解:Action类必须继承org.apache.struts.action.Action类,并且要覆盖execute()方法.
方法参数说明:
mapping:封装了struts-config.xml文件中该Action类相关的配置信息,编程时常会用到mapping.findForward("<forward>标记的name属性值")方法,使用该方法可以返回ActionForward对象,以指导页面跳转;maping.getInput()方法返回<action>标记中input属性值,返回类型为String类型;mapping.getInputForward()方法将<action>标记中input属性值封装成ActionForward对象,以指导页面跳转。
form:当前处理所对应的ActionForm对象。
request:当前处理的请求对象。
reponse:当前处理的响应对象。
ActionForm:该对象用于封装所要跳转到的目标页面路径,其原因在于直接将文件路径置于程序中进行硬编码不利于修改和维护,因此用该对象来封装其路径。
分享到:
相关推荐
Spring in Action CN.001<br>Spring in Action CN.002<br>Spring in Action CN.003<br>Spring in Action CN.004<br>Spring in Action CN.005<br>Spring in Action CN.006<br>Spring in Action ... <br>本书信息:...
form name="myform" id="myform" action="ssss" method="post" onsubmit="getUrl();"> javascript方法: [removed] function getUrl(){ $('form').attr('action','new_url'); } [removed] 或者用单纯的...
Spring in Action CN.001<br>Spring in Action CN.002<br>Spring in Action CN.003<br>Spring in Action CN.004<br>Spring in Action CN.005<br>Spring in Action CN.006<br>Spring in Action ... <br>本书信息:...
1:非重用型:只能在被存储它的TEST中...右键ACTION PROPERTIES>EXTERNAL ACTION>USE A LOCAL,EDITABLE COPY。 调用重用型的ACTION可以在以后新版本中控件发生变化时只升级被调用的可重复型ACTION所在的源程序即可。
ACTION
Akka in Action shows you how to build message-oriented systems with Akka. This comprehensive, hands-on tutorial introduces each concept with a working example. You’ll start with the big picture of ...
jQuery in Action, Third Edition, is a fast-paced guide to jQuery, focused on the tasks you'll face in nearly any web dev project. In it, you'll learn how to traverse the DOM, handle events, perform ...
Mirillis Action!是一款高质量顶级屏幕录制软件,乍一看Action录制软件是不是有点像 Bandicam,其实吧这家伙不但长的像功能也很强悍,其保存输出格式可以保存为高质量的AVI、MP4格式,输出尺寸也可以为适应具体用途...
资源中示例了一个struts2的配置文件中配置的action的result结果为另外一个action的配置,该跳转的过程中是带所有参赛调整的,在另外一个action中可以接受到当前action的所有参数,此配置文件是我日常开发中的经验...
Struts2 中 Action 接收参数的方法 Struts2 框架中,Action 组件可以通过多种方式接收参数,这些方式包括使用 Action 的属性、使用 DomainModel 和使用 ModelDriven。下面将详细介绍这些方法: 使用 Action 的属性...
jsp自动调用action采用中间jsp方法 就是采用从欢迎页跳到action处理再转到展示页面,就可以访问页面时加载数据
Hadoop In Action 中文第二版 卷二 rar
MongoDB in Action, 2nd Edition
android Action call 拨打电话 Intent.ACTION.CALL
spring in action所需jar包
电子书 Entity Framework 4 In Action
主要介绍了JavaScript获取网页表单action属性的方法,涉及javascript操作表单属性的技巧,具有一定参考借鉴价值,需要的朋友可以参考下
Camel in Action is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It ...
Camel in action 一书的PDF电子书 和源代码
Action-RPG Starter Kit 6.55 商店几百买的最新