struts2[2]总结

1.结果集

    1.1转发

    1.2重定向

    1.3转发到Action

    1.4重定向到Action

2.获得原生的ServletAPI

    2.1ActionContext 数据中心

        2.1.1request

        2.1.2response

        2.1.3ServletContext

        2.1.4sessionScope

        2.1.5applicationScope

        2.1.6params

扫描二维码关注公众号,回复: 4263501 查看本文章

        2.1.7attrs...

    2.2获得ActionContext,ActionContext.getContext();

        2.2.1request

        2.2.3sessionScope

        2.2.3applicationScope

        2.2.4params

        2.2.5attrs

    2.3获得ActionContext中原生对象的工具类

        2.3.1request

        2.3.2response

3参数封装

    3.1属性驱动:Action准备与参数键同名属性

    3.2对象驱动:Action准备与参数键同名属性

    3.3模型驱动

        3.3.1实现ModelDriver接口

        3.3.2实现getModel方法,返回需要封装的参数对象

    3.4复杂参数封装

        3.4.1List集合:提交键

                                 list、list[index]

        3.4.2Map集合:提交键

                                 map['key']

猜你喜欢

转载自blog.csdn.net/a_cherry_blossoms/article/details/84544254
今日推荐