struts2 05 action通配符
来源:互联网 发布:淘宝商城865药店 编辑:程序博客网 时间:2024/05/01 22:48
实现动态访问还可以通过通配符
eg:
<action name="user*" class="pack.manager" method="{1}">
<result >/success_{1}.jsp</result>
</action>
当访问时 如果输入 http://localhost:8080/Demo/userAdd
就会匹配到这个action。这时*就匹配为Add 后面method的1的意思是第一个星号,所以 也就是等于 method="Add"
下面同理。即 success_Add.jsp。
这样可以实现动态访问。
比如 访问换成 http://localhost:8080/Demo/userDel 就会去调用manager类中的Del方法。返回的页面也变为succes_Del.jsp
这样不用更改action实现了动态访问。
0 0
- struts2 05 action通配符
- Struts2 Action配置通配符
- struts2 action通配符
- struts2 & action&通配符
- Struts2 使用通配符定义action
- Struts2使用通配符配置action
- Struts2的Action配置通配符
- Struts2 Action使用通配符提交
- 【struts2】action中使用通配符
- 【struts2】action中使用通配符
- Struts2的Action的通配符
- Struts2用通配符配多个action方法
- Struts2 action定义和通配符定义
- struts2 使用通配符动态定义action
- Struts2中Action通配符的配置
- Struts2 使用通配符动态请求Action
- Bug-struts2的action的通配符使用
- Struts2笔记14 action通配符配置
- CSS3 经典教程系列——CSS3 RGBA 用法详解
- PhpExcel中文帮助手册|PhpExcel使用方法
- 使用VS2010 C#开发ActiveX控件
- 此博客创建于2014年8月21日16:10pm
- 中断线程的几种方法
- struts2 05 action通配符
- VB身份证验证
- 20140821 主 板 调 试 日 记 加了 s p i后 master 跑不下去
- ruby基础-数组篇
- 嵌入式linux下操作GPIO
- 【问题】使用GCC编译c++程序遇到的protected继承问题
- 我就是我
- Procedural generated mesh in Unity: Part 1
- Windows下用Eclipse搭建C/C++开发环境