1. 复习 servlet 和 JSP
    1. 理解作用域
      1. 应用作用域 application
      2. 会话作用域 session
      3. 请求作用域 request
      4. 页面作用域 page
    2. 区分两个属性
      1. attribute
        1. 主要指页面中标记 (markup) 或者标签 (tag) 中的属性
      2. property
        1. 主要指 JavaBean 中的字段
  2. Struts 中的 3 种控制器代码
    1. 简单验证: 通过称为 ActionForm 的 Struts 基类的子类来进行的
    2. 复杂验证和业务逻辑是由名为 Action 的 Struts 基类的子类来完成的
    3. 控制流也是由 Action 子类来决定的
  3. 处理业务逻辑
    1. Action 的无状态性
      1. 一定不能在 Action 子类中保存数据
    2. 子类化 Action
      1. 覆盖 execute 方法
        1. ActionForward
          1. 需要显示的下一个页面, 这是 execute 的返回值
        2. ActionMapping
          1. 表示这个 Action 和其可能的下一个页面之间的关系
        3. ActionForm
          1. 包含输入的表单信息
        4. HttpServletRequest
          1. 包含请求范围和会话范围的数据
        5. HttpServletResponse
          1. 允许输出数据到用户的浏览器中
    3. 注册 Web 应用程序中的业务逻辑
      1. 复杂验证
        1. ActionMessages
        2. saveErrors(request, errors)
        3. <html:errors property="" />
      2. 数据交换
      3. 导航
        1. mapping.getInputForward()
          1. 获得对输入页面的引用
        2. mapping.findForward(...)
  4. 基本 Struts 标签库
    1. HTML
    2. Bean
      1. 主要用于输出文本的定制标签
      2. 显示数据,要通过 request.setAttribute(...) 传递 Bean
    3. Logic
      1. 提供标签来进行条件处理和循环
    4. Nested
      1. 具有显示一个表单或者对象的"嵌套"属性的标签
    5. Tiles
      1. 包含能够创建布局的标签
  5. 配置 Struts
    1. 表单 Bean 声明
      1. 将 ActionForm 子类映射到一个逻辑名
    2. 全局异常
      1. 定义在处理其间抛出的异常的处理器
    3. 全局转发
      1. 将某个页面映射到一个名字,避免了 url 硬编码
    4. 表单处理器
      1. 也称动作映射
    5. 控制器声明
      1. 配置 Struts 的内在行为,很少用到
    6. 消息资源
      1. 告诉 Struts 到哪里查找属性文件
    7. 插件声明
      1. 声明 Struts 扩展的地方,如 Tiles, Validator
  6. 上传文件
    1. <html:form enctype="multipart/form-data" action=...
    2. <html:file property="myFile" />
    3. FormFile.getInputStream()
    4. FormFile.destroy()
  7. 高级 Struts
    1. Tiles
      1. 布局 layout
      2. 组件 component
    2. Validator 框架
    3. 动态表单
  8. Struts 锦囊
    1. PropertyUtils
      1. isReadable(Object bean, String property)
      2. isWritable(Object bean, String property)
      3. getPropertyType(Object bean, String property)
      4. setProperty(Object bean, String Property)
    2. DownloadAction
      1. 实现 StreamInfo 接口
      2. 继承 DownloadAction, 覆盖 getStreamInfo()
      3. 在 struts-config.xml 文件配置一个表单处理器 <action >
    3. LocaleAction
    4. IncludeAction/ForwardAction
      1. 处理遗留的 servlet
    5. LookupDispatchAction
    6. DispatchAction
    7. MappingDispatchAction
    8. 全局转发
    9. 日志
    10. 通配符
    11. 分解 struts-config.xml