Struts2配置文件中使用通配符
来源:互联网 发布:数据分析推荐书籍 编辑:程序博客网 时间:2024/05/21 11:17
形式一:调用相同Action中的不同方法
- <action name="*Action" class="Jcuckoo.LoginRegistAction" method="{1}">
- <result name="input">/login.jsp</result>
- <result name="error">/error.jsp</result>
- <result name="success">/welcome.jsp</result>
- </action>
如果用户请求的URL为loginAction.action,则调用Jcuckoo.LoginRegistAction中的login方法;
如果用户请求的URL为registerAction.action,则调用Jcuckoo.LoginRegistAction中的register方法;
形式二:通过匹配,调用不同的Action的execute方法
- <action name="*Action" class="Jcuckoo.{1}Action">
- <result name="input">/login.jsp</result>
- <result name="error">/error.jsp</result>
- <result name="success">/welcome.jsp</result>
- </action>
如果用户请求的URL为LoginAction.action,则调用Jcuckoo.LoginAction中的execute方法;
如果用户请求的URL为RegisterAction.action,则调用Jcuckoo.RegisterAction中的execute方法;
形式三:动态结果
- <action name="crud_*" class="Jcuckoo.CrudAction" method="{1}">
- <result name="input">/input.jsp</result>
- <result>/{1}.jsp</result>
- </action>
当处理结果是success时,
如果crud_create.action,则会执行Jcuckoo.CrudAction中的create方法,并且跳转到/create.jsp;
如果crud_delete.action,则会执行Jcuckoo.CrudAction中的delete方法,并且跳转到/delete.jsp;
- Struts2配置文件中使用通配符
- Struts2配置文件中使用通配符
- struts2--配置文件中使用通配符
- struts2-配置文件中通配符的使用
- struts2--配置文件通配符的使用
- Struts2配置文件通配符的使用
- Struts2配置文件中使用通配符收藏method="{1}"
- Struts2中使用通配符
- struts2中通配符使用
- struts2多配置文件使用通配符加载
- Struts2 spring 多配置文件使用通配符
- Struts2配置文件中的通配符的使用
- struts2中通配符的使用
- 【struts2】action中使用通配符
- 【struts2】action中使用通配符
- struts2——配置文件通配符!!!
- struts2通配符的使用
- struts2通配符的使用
- 关联式容器
- 按钮式的左右滚动切换
- [水晶报表]筛选记录三种解决方案
- Learning Mambo: A Step-by-Step Tutorial to Building Your Website
- 100 个高质量的 XHTML/CSS 模板(上)100 个高质量的 XHTML/CSS 模板(上)
- Struts2配置文件中使用通配符
- 2008山寨语录
- HTTP 状态代码
- Learn OpenOffice.org Spreadsheet Macro Programming
- BizTalk 2006 Recipes: A Problem-Solution Approach
- Spring + Hibernate 数据访问策略
- asp下实现代码的“运行代码”“复制代码”“保存代码”功能源码
- Developer's Guide to Web Application Security [ILLUSTRATED]
- Windows API