02. struts2的运行流程

1.启动服务,加载web.xml实例化StrutsPrepareAndExecuteFilter过滤器

2.在实例化StrutsPrepareAndExecuteFilter的时候会执行过滤器中的init方法加载struts.xml

3.浏览器发起请求,会被StrutsPrepareAndExecuteFilter拦截到,根据请求的uri(hello)找到相应的Action类,并且创建Action对象,执行相应的hello方法。

4.返回视图标志,展示success.jsp

猜你喜欢

转载自blog.csdn.net/weixin_44199723/article/details/85345702