spring struts2

插件

Struts-plugin.xml

说明:

Struts-plugin.xml文件是在tomcat服务器启动的时候加载的

该配置文件在classpath的根目录下

在每一个含有plugin字母的jar包的根目录下有一个struts-plugin.xml文件

当tomcat启动的时候,就把所有的含有plungin的jar包的该配置文件就加载了。

struts2启动时候的时序图

struts2启动的时候  执行web.xml中的 核心过滤器filter类 ,filter类执行init初始化方法,init方法调用  InitOperations类的initDispatcher方法返回类型 是dispatcher,

initDispatcher进去后方法调用Dispatcher类的init方法

init方法进去后调用init——DefaultProperties方法

, 新建了一个DefaultPropertiesProvider();rigister方法加载了配置文件org、

 Dispatcher类执行init_DefaultProperlies()方法后,执行,init_Traditional方法

init_Tradi中的   配置文件路径

struts2核心流程

url访问   核心过滤器的doFilter方法

编码

  

猜你喜欢

转载自www.cnblogs.com/hellowq/p/10008830.html