zoukankan      html  css  js  c++  java
  • struts2运行流程

    1.首先客户端发送请求

    2.请求经过 一系列过滤器最后到达web.xml中配置的StrutsPrepareAndExecuteFilter核心过滤器

    3.StrutsPrepareAndExecuteFilter询问ActionMapper是否需要请求action。

    4.如果需要调用action,过滤器把请求交给ActionProxy,ActionProxy通过ConfigurationManager读取struts.xml配置文件,找到需要调用的Action。

    5.ActionProxy创建ActionInvocation,经过一系列拦截器,ActionInvocation调用Action

    6.找到完整类名执行struts.xml文件中action标签中配置的方法(默认方法execute)

    7.ActionInvocation根据返回值在struts.xml中寻找结果集

    8.返回result结果集中配置的jsp页面给 客户端

    ------------------------------------------------------------------------------------

    简单版

    1.客户端发送请求

    2.StrutsPrepareAndExecuteFilter接收请求读取struts.xml配置文件

    3.从struts.xml文件中找到对应的action

    4.根据完整类名找到action执行struts.xml中配置的方法(默认方法execute)

    5.执行方法,根据返回值匹配struts.xml中的result结果集

    6.返回结果集中配置 的jsp页面给客户端

  • 相关阅读:
    ⑥nginx location
    ③nginx 多虚拟主机配置
    ①nginx 安装简介
    11.ansible 角色
    10.ansible 标签功能 触发功能 忽略远程主机采集
    9.ansible 循环功能和忽略错误
    8.ansible 判断功能
    7.ansible在剧本中注册信息
    6.ansible变量
    5.ansible 剧本编写规范
  • 原文地址:https://www.cnblogs.com/suni/p/8649882.html
Copyright © 2011-2022 走看看