Struts之ForwardAction
在Struts中,通过action跳转jsp,但是有时希望仅仅只是跳转页面,而不需要action,这时可以用ForwardAction。
定义一个仅仅是跳转的ForwardAction如下:
<action-mappings>
<!-- 请求的URL对应于<action>中的path属性 -->
<action path="/newHelloWorld"
type="org.apache.struts.actions.ForwardAction"
parameter="/JSP/newHelloWorld.jsp" />
</action-mappings>
这样,在浏览器中输入newHelloWorld.do,就会立即跳转到newHelloWorld.jsp页面。
注:如果发生找不到ForwardAction类的错误,则要包含struts-extras-1.3.10.jar包。
Struts之ForwardAction的更多相关文章
- Struts ForwardAction Example
In Struts MVC model, you have to go thought the Action Controller to get a new view page. In some ca ...
- Struts核心技术简介
Struts核心技术简介 1.Struts内部机制 Struts是一种基于MVC经典设计模式的开发源代码的应用框架,它通过把Servlet.JSP.JavaBean.自定义标签和信息资源整合到一个 ...
- Struts 笔记 内部资料 请勿转载 谢谢合作
Struts 概述 随着MVC 模式的广泛使用,催生了MVC 框架的产生.在所有的MVC 框架中,出现最早,应用最广的就是Struts 框架. Struts 的起源 Struts 是Apache 软件 ...
- 教你如何精通Struts:Tiles框架
Tiles框架特性和内容 Tiles框架为创建Web页面提供了一种模板机制,它能将网页的布局和内容分离.它允许先创建模板,然后在运行时动态地将内容插入到模板中.Tiles 框架建立在JSP的inclu ...
- Struts – Multiple configuration files example
Many developers like to put all Struts related stuff (action, form) into a single Struts configurati ...
- Configure a welcome page in Struts
Every website need a welcome or default page as an entry point. Here's 3 ways to configure a welcome ...
- Struts DynaActionForm example
The Struts DynaActionForm class is an interesting feature to let you create a form bean dynamically ...
- Struts – MappingDispatchAction Example
Struts MappingDispatchAction class is used to group similar functionality into a single action class ...
- DispatchAction和ForwardAction
添加功能的步骤:做页面——编写DAO类中的方法——编写和配置action. 如果多个action 使用一个formbean,这种事儿多发生在统一模块中,就可以用一个Action集中处理多个操作,而不要 ...
随机推荐
- 剑指Offer30 从1到n整数出现1的个数
/************************************************************************* > File Name: 30_NumerO ...
- Linux 网卡设备驱动程序设计(3)
三.网络子系统深度分析 用户程序通过网络发送这个网络数据包 通过 SCI 协议无关接口 协议栈 < UDP的实现 会选择路由 < IP的实现 会建立这个邻居子系统,建立邻居信 ...
- Python类和实例
面向对象最重要的概念就是类(Class)和实例(Instance),必须牢记类是抽象的模板,比如Student类,而实例是根据类创建出来的一个个具体的“对象”,每个对象都拥有相同的方法,但各自的数据可 ...
- ios中的事件处理、响应者链条以及第一响应者
在ios中,事件UIEvent类来表示,当一个事件发生时,系统会搜集的相关事件信息,创建一个UIEvent对象,最后将该事件转发给应用程序对象(UIApplication).日常生活中,主要有三种类型 ...
- linux 信号列表和基本作用
我们运行如下命令,可看到Linux支持的信号列表: $ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7 ...
- javascript之面向对象程序设计(对象和继承)
总结的文章略长,慎点. 知识点预热 引用类型:引用类型的值(对象)是引用类型的一个实例.在ECMAScript中,引用类型是一种数据结构,用于将数据和功能组织在一起.在其他面向对象语言中被称为类,虽然 ...
- Typical sentences in SCI papers
Beginning 1. In this paper, we focus on the need for 2. This paper proceeds as follow. 3. Th ...
- 各个公司的来源/The etymology of company
1.List of Company Etymology 下面的维基百科词条是比较有名的一些公司的名称的来源 List of company name etymologies 2.Atmel : adv ...
- OpenGL 回顾——简化版的窗体(包含鼠标控制,普通键位控制,以及镜面反射)
// OpenGLBook.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" //变量声明 static GLfloat spin =0.0; ...
- Win8 URI 方案 ms-appX 用法大全
ms-appdata://可以引用来自应用的本地.漫游和临时数据文件夹中的应用文件ms-appdata:///local/hello/logo.png ms-appx://可以引用来自应用包的应用文件 ...