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集中处理多个操作,而不要 ...
随机推荐
- 3D--知识点1
三层架构 1.DAL(数据访问层)-->与数据库进行关联,对数据库进行增删改查操作2.BLL(业务逻辑层)-->负责加减乘除与或非操作,比如:用户注册3.UI/web(表示层) sqlse ...
- 获取XML数据
http://www.w3school.com.cn/xml/xml_elements.asp <?xml version="1.0" encoding="gb23 ...
- Table of Contents - TCP/IP
网络访问层 Ethernet II 网际层 IP IPv4 报文格式 ICMP ICMP 报文分析 ping: 向网络主机发送 ICMP ECHO_REQUEST 包 ARP ARP 过程 arp 命 ...
- ios卡牌游戏项目源码
上传者fu_sion,源码CardGame,一副牌从中抽取十二张牌,翻开牌可以相同的花色+1 相同的数字+4分 同一张牌翻开后可以盖上(算是一个BUG)就酱紫~~ 项目源码下载:http://code ...
- 各个手机APP客户端内置浏览器useragent
手机QQ Mozilla/5.0 (Linux; Android 4.4.2; GT-I9500 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko ...
- 【学习笔记】【C语言】选择结构-switch
1.用法 switch(整型表达式) { case 数值1: 语句1; break; case 数值2: 语句2; br ...
- [Bootstrap]组件(三)
输入框组 添加额外元素.input-group-addon 外包元素.input-group>input-group-addon+form-control <div class=" ...
- pop()实现逐个删除数组最后一位并输出
使用pop()循环输出数组的最后一个元素 var a = []; a.push(1);a.push(3.1415926);a.push("number");a.push(" ...
- SCP服务实现Linux交互
SCP服务实现Linux交互 在实际工作中,我们可以使用scp服务器进行Linux与Linux之间的信息交互. 基本指令: scp 本地文件 远程文件 scp ...
- FPGA笔记-读取.dat文件
读取.dat图像文件 .dat文件是matlab生成的图像文件 initial begin // Initialize Inputs CLK = 0; RST = 1; IMAGE_DATA = 0; ...