文档库 最新最全的文档下载
当前位置:文档库 › Struts2知识综合应用-初级(1).

Struts2知识综合应用-初级(1).

?一、理论
1、Struts2的由来
Struts2 约等于 webwork2
Struts2框架=Struts2模块+xwork模块
2、Struts2的运行流程
ActionContextCleanUp -> otherFilters(sitemesh)->FilterDispatcher
ActionMapper -> FilterDispatcher -> ActionProxy -> 【ConfigurationManager】 -> struts.xml
ActionInvocation -> Intercpetor1【前】->Intercpetor2【前】... -> Action -> Result -> Template【jsp】 -> s标签
Intercpetor2【后】->Intercpetor1【后】倒着运行那些Filter
3、Struts2的MVC
M: Action
V: JSP
C: FilterDispatcher
二、核心知识
1、Action
public String execute() throws Exception
1.1、method属性
1.2、。。。
。。。
。。。
2、Result
2.1、global-result
2.2、查找顺序
。。。
。。。
。。。
3、Interceptor
3.1、Struts2很多的功能都是用拦截器来实现的
不用你自己管
赋值型:params、staticParams、modelDriven、servletConfig
3.2、拦截器的运行顺序
。。。
。。。
4、s标签
4.1、数据标签
4.2、控制标签
4.3、UI标签
4.3.1、theme xhtml/simple
4.3.2、key、name和value的关系
【测试一下】

相关文档
相关文档 最新文档