struts2的知识
result的类型
转向
<result type="dispatcher">
<param name="location" > .......</param>
</result type="dispatcher">
重定向到jsp
<result type="redirect">
<param name="location">.......</param>
</result type="redirect">
重定向到action
<result type="redirectAction">
<param name="actionName">.....</param>
<param name="namespace">....</param>
</result type="redirectAction">
通配符的使用:
*可替代相同位置 变化的地方 其他地方不变
{1}{2}分别对应第一个*传过来的值和第二个*传过来的值
{0}表示通配符的整个子串..
在xml文件中
<action name="*_*" class="it.cast.demo.{1}" method="{2}">
<result name="success">
/{1}.jsp
</result>
</action>
动态方法调用:
action中不配置method
浏览器调用时通过:命名空间+actionName+!+方法名+后缀的方法进行调用
<a href=" ${pageContext.request.ContextPath}/primer/HelloWordAction!getObj.action" />
struts2的知识的更多相关文章
- Struts2入门1 Struts2基础知识
Struts2入门1 Struts2基础知识 20131130 代码下载: 链接: http://pan.baidu.com/s/11mYG1 密码: aua5 前言: 之前学习了Spring和Hib ...
- struts2 相关知识
struts2学习笔记 1.struts.properties struts.properties 是可以不要的!!!因为 struts.xml文件中 有 <constant> 这个节点, ...
- (二)Struts2 核心知识
所有的学习我们必须先搭建好Struts2的环境(1.导入对应的jar包,2.web.xml,3.struts.xml) 第一节:Struts2 get/set 自动获取/设置数据 action代码: ...
- 经典MVC框架技术-struts2基础知识
Struts2框架简介 struts2框架是在struts1和webwork技术的基础上,进行合并的全新框架,struts2以Webwork为核心,采用拦截器来处理用户的请求,这样的设计使得业务逻辑控 ...
- struts2学习(2)struts2核心知识
一.Struts2 get/set 自动获取/设置数据 根据上一章.中的源码继续. HelloWorldAction.java中private String name,自动获取/设置name: pac ...
- struts2学习(4)struts2核心知识III
一.result配置: result - name 就是前面返回的值,success,error等. type: dispatcher. 默认是这个,底层是jsp的forward: redirect: ...
- struts2学习(3)struts2核心知识II
一.struts.xml配置: 1.分模块配置方法: 比如某个系统多个模块,我们把资产管理模块和车辆管理模块,分开,在总的struts.xml配置文件中include他们: 工程结构: struts. ...
- Struts2基础知识
1.什么是Struts2框架? 答:struts2是一款优秀的mvc框架,集中解决了Controlller的相关问题,解决了部分视图相关的问题(struts2标签): mvc 是一种思想,包括Mode ...
- Struts2 源码分析——前言
笔者简言 笔者在博园里面注册是在二年前.可是那个时候我不知道要写些什么,也怕写出来被别人骂误人子弟.而现在却动笔了是因为前一段时间内我去参加一些大公司的面试,让笔者内心深处留下很多问号.最近三年来我一 ...
随机推荐
- delphi 13 打印相关
打印 页面设置 打印预览 文档属性 //---------------------------------------------------------------------------- ...
- android 用ListView实现表格样式
原文:http://blog.csdn.net/centralperk/article/details/8016350 效果图: 源码下载地址:http://download.csdn.net/det ...
- 图解JS原型链
一:任何一个对象都有一个prototype的属性,在js中可以把它记为:__proto__ 当初ECMAscript的发明者为了简化这门语言,同时又保持继承的属性,于是就设计了这个链表.. 在数据结构 ...
- 高级I/O之异步I/O
A synchronous I/O operation causes the requesting process to be blocked until that I/O operation com ...
- printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - 输出格式转换函数
参考:http://blog.sina.com.cn/s/blog_674b5aae0100prv3.html 总览 (SYNOPSIS) #include <stdio.h> int p ...
- Oracle11g for RedHat6.4安装手册
一. 检查 Oracle 11g 安装所依赖的软件包 检查包是否安装 # rpm -q 包名 包名: 1 ) binutils 2 ) compat-libstdc++ 3) elfutils ...
- u检验、t检验、F检验、X2检验 (转)
http://blog.renren.com/share/223170925/14708690013 常用显著性检验 1.t检验 适用于计量资料.正态分布.方差具有齐性的两组间小样本比较.包括配对资料 ...
- T-SQL 之 概述
T-SQL(Transact Structured Query Language )它是ANSI和ISO SQL 标准的Microsoft SQL Server方言或扩展,SQL SERVER专用标准 ...
- 1045 | error connecting to master 'slave_user@192.168.0.75:3306' - retry-time: 6
mysql 主从复制问题整理 问题: 1045 | error connecting to master 'slave_user@192.168.0.75:3306' - retry-t ...
- github/hexo搭建个人博客几个问题总结
问题一:hexo ERROR Deployer not found: github or hexo ERROR Deployer not found: git npm install hexo-dep ...