Struts创建流程

  

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

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

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

4根据方法返回的字符串 调用对应的jsp

猜你喜欢

转载自www.cnblogs.com/classmethond/p/10367090.html
今日推荐