您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Struts in Action 中文版.pdf
  所属分类: Java
  开发工具:
  文件大小: 3mb
  下载次数: 0
  上传时间: 2008-09-18
  提 供 者: skin****
 详细说明: 目 录 1. 介绍.........................................................................................................18 1.1. 关于本书...............................................................................................................19 1.1.1. 谁创建了Struts?...................................................................................................19 1.1.2. 为什么Struts 要开源?.........................................................................................19 1.1.3. 为什么叫Struts?........................................... ........................................................19 1.1.4. 落到实处...............................................................................................................27 1.1.5. 再看看...................................................................................................................34 1.2. 小结.......................................................................................................................36 2. 深入STRUTS 架构..................................................................................37 2.1. 随便谈谈...............................................................................................................38 2.2. 为什么我们需要Struts .......................................................................................38 2.2.1. 退一进三...............................................................................................................38 2.2.2. 进入 Struts ...........................................................................................................39 2.2.3. Struts 控制器组件................................................................................................39 2.2.4. 用Struts 开发Web 应用......................................................................................42 2.3. 为什么需要框架...................................................................................................43 2.3.1. Web—永无休止的修补........................................................................................43 2.3.2. Servlet 解决方案.................................................................................................44 2.3.3. Servlet 框架.........................................................................................................44 2.3.4. 黑盒-白盒统一体.................................................................................................45 2.4. Struts, Model 2,以及 MVC................................................................................46 2.4.1. MVC 的演化.........................................................................................................46 2.4.2. Model 2 的出现....................................................................................................47 2.4.3. 应用层—视图之间的去耦合...............................................................................47 2.4.4. Struts 如何实现Model 2, MVC, 和分层............................................................49 2.5. Struts 控制流......................................................................................................50 2.5.1. 总图.......................................................................................................................51 2.5.2. 出色的细节...........................................................................................................52 2.5.3. Struts 是富有效率的吗?......................................................................................54 2.6. Struts 的长处和弱点...........................................................................................55 2.6.1. 弱点.......................................................................................................................56 2.6.2. Struts 的强项........................................................................................................58 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 3 页 http://www.blogjava.net/steelhand 2.7. 小结.......................................................................................................................59 3. 构建一个简单应用....................................................................................60 3.1. 被支柱支撑的支柱...............................................................................................61 3.1.1. 为什么选择 logon 应用? .....................................................................................61 3.2. 漫游logon 应用...................................................................................................62 3.2.1. 从这里开始...........................................................................................................62 3.2.2. 我们看到的屏幕...................................................................................................62 3.2.3. 欢迎屏幕...............................................................................................................63 3.2.4. 登录屏幕...............................................................................................................63 3.2.5. 重新显示欢迎屏幕...............................................................................................65 3.2.6. 欢迎屏幕,再见...................................................................................................65 3.2.7. 所使用的特征.......................................................................................................66 3.3. 解剖 logon 应用.................................................................................................66 3.3.1. 欢迎屏幕的浏览器代码.......................................................................................66 3.3.2. 欢迎页面的JSP 源代码.......................................................................................67 3.3.3. Welcome 屏幕的配置源代码...............................................................................70 3.3.4. logon 屏幕的浏览器代码....................................................................................70 3.3.5. logon 的配置源代码............................................................................................73 3.3.6. LogonSubmit 配置................................................................................................74 3.3.7. LogonForm 源代码..............................................................................................75 3.3.8. LogonAction 源代码...........................................................................................77 3.3.9. LogoffAction 源代码...........................................................................................83 3.4. 构造应用...............................................................................................................86 3.4.1. 定义需求...............................................................................................................86 3.4.2. 规划应用...............................................................................................................87 3.4.3. 规划源代码树.......................................................................................................89 3.4.4. 设置开发工具.......................................................................................................90 3.4.5. 设置 build.xml 文件............................................................................................91 3.4.6. 设置web.xml 文件...............................................................................................91 3.4.7. 设置 struts-config.xml 文件...............................................................................91 3.4.8. 测试部署情况.......................................................................................................93 3.4.9. 构造欢迎页面.......................................................................................................95 3.4.10. 构造logon 页面...................................................................................................97 3.4.11. 构造Constants 类.................................................................................................98 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 4 页 http://www.blogjava.net/steelhand 3.4.12. 构造其他类.........................................................................................................100 3.4.13. 创建user directory..............................................................................................100 3.4.14. 配置ActionErrors...............................................................................................101 3.4.15. 编译并测试logon 页面.....................................................................................101 3.4.16. 修改welcome 页面............................................................................................102 3.4.17. Struts ForwardAction Action...............................................................................104 3.5. 小结.....................................................................................................................105 4. 配置STRUTS 组件................................................................................106 4.1. 三个 XML 文件和一个属性文件....................................................................107 4.1.1. 家族的其他人员.................................................................................................107 4.2. Web 应用部署描述符........................................................................................107 4.2.1. Web.xml 文件....................................................................................................107 4.2.2. ActionServlet 的参数......................................................................................... 110 4.3. Struts 配置......................................................................................................... 112 4.3.1. 细节, 更多细节.................................................................................................. 113 4.3.2. 变更管理............................................................................................................. 114 4.3.3. 受保护的变更原则............................................................................................. 115 4.4. Struts 配置元素................................................................................................. 115 4.4.1. ............................................................................................ 117 4.4.2. ...................................................................................................... 118 4.4.3. ............................................................................................... 118 4.4.4. .............................................................................................. 119 4.4.5. ........................................................................................................120 4.4.6. ..........................................................................................121 4.4.7. .............................................................................................................121 4.4.8. ....................................................................................................122 4.4.9. 该你了.................................................................................................................123 4.4.10. Struts config 骨架..............................................................................................123 4.5. 应用资源文件.....................................................................................................125 4.6. Ant 构建文件.....................................................................................................127 4.7. 配置 Struts 核心..............................................................................................129 4.7.1. 安装Java 和Java servlet 容器........................................................................130 4.7.2. 安装开发环境.....................................................................................................130 4.7.3. 安装Struts 核心文件.........................................................................................130 4.7.4. 配置Tiles 框架...................................................................................................130 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 5 页 http://www.blogjava.net/steelhand 4.8. 配置Struts Validator.........................................................................................132 4.9. 从空白Struts 应用开始....................................................................................134 4.10. 配置模块化应用.................................................................................................135 4.10.1. 分而治之.............................................................................................................136 4.10.2. 给页面加前缀.....................................................................................................137 4.10.3. 修改配置.............................................................................................................138 4.10.4. 共享Struts JAR ..................................................................................................138 4.11. 小结.....................................................................................................................138 5. 用ACTIONFORM 传递数据...................................................................140 5.1. 吃的是草,挤出的是奶.....................................................................................141 5.1.1. ActionForm 的要求...........................................................................................142 5.2. 千面女郎 ActionForm......................................................................................143 5.2.1. ActionForm 作为字段收集器...........................................................................143 5.2.2. ActionForm 作为数据缓冲...............................................................................145 5.2.3. ActionForm 作为数据校验器...........................................................................145 5.2.4. ActionForm 作为类型转换器...........................................................................146 5.2.5. ActionForm 作为传输对象(TO) ..................................................................146 5.2.6. ActionForm 作为防火墙...................................................................................147 5.3. ActionForm 设计推论.......................................................................................147 5.3.1. ActionForm 可以共享名称................................................................................147 5.3.2. ActionForm 可以最小化用户代码....................................................................148 5.3.3. ActionForm 可以封装Helper ............................................................................148 5.3.4. ActionForm 可以嵌套其它bean........................................................................148 5.4. ActionForm 的风情..........................................................................................150 5.4.1. Map 支持(Map-backed)的ActionForm ........................................................150 5.4.2. DynaActionForm.................................................................................................151 5.5. 关于ActionForm 的疑问..................................................................................152 5.5.1. 为什么ActionForm 不仅仅是一个Map? .........................................................152 5.5.2. 为什么ActionForm 不是一个普通 JavaBean? ................................................152 5.5.3. 为什么ActionForm 不是一个接口?..................................................................153 5.6. 小结ActionForm...............................................................................................153 5.6.1. 实现业务层接口.................................................................................................155 5.6.2. 嵌套可变值对象.................................................................................................156 5.6.3. 设置不可变值对象.............................................................................................156 5.6.4. 设置可变值对象.................................................................................................158 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 6 页 http://www.blogjava.net/steelhand 5.6.5. 使用工厂方法.....................................................................................................158 5.6.6. 传递Map ............................................................................................................159 5.6.7. 通过反射传递值.................................................................................................162 5.6.8. 使用适配器类.....................................................................................................166 5.7. BaseForm...........................................................................................................167 5.7.1. SessionLocale......................................................................................................168 5.7.2. 分派(Dispatch)...............................................................................................168 5.7.3. 自动组装.............................................................................................................169 5.7.4. BaseMapForm.....................................................................................................169 5.8. 小结.....................................................................................................................170 6. 连线 ACTIONFORWARD .....................................................................171 6.1. ActionForward 做什么.....................................................................................172 6.2. ActionForward 如何工作.................................................................................173 6.2.1. 转发和重定向.....................................................................................................173 6.3. 全局和局部转发.................................................................................................174 6.4. 运行时参数.........................................................................................................175 6.4.1. 在页面中添加参数.............................................................................................175 6.4.2. 在Action 类中添加参数....................................................................................176 6.5. 动态转发.............................................................................................................177 6.6. 为什么地址栏不变?.........................................................................................177 6.7. 玩转ActionForward .........................................................................................177 6.8. 小结.....................................................................................................................178 7. 设计ACTIONMAPPING........................................................................179 7.1. 进入ActionMapping.........................................................................................180 7.1.1. ActionMapping bean...........................................................................................180 7.1.2. ActionMapping 目录.........................................................................................181 7.2. ActionMapping 属性........................................................................................181 7.2.1. path 属性.............................................................................................................183 7.2.2. forward 属性......................................................................................................183 7.2.3. include 属性.......................................................................................................183 7.2.4. type 属性............................................................................................................183 7.2.5. classname 属性...................................................................................................184 7.2.6. name 属性...........................................................................................................184 7.2.7. roles 属性............................................................................................................184 7.2.8. scope 属性...........................................................................................................184 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 7 页 http://www.blogjava.net/steelhand 7.2.9. validate 属性.......................................................................................................184 7.2.10. input 属性...........................................................................................................184 7.2.11. parameter 属性....................................................................................................185 7.2.12. attribute 属性......................................................................................................186 7.2.13. prefix 和suffix 属性...........................................................................................186 7.2.14. unknown ActionMapping....................................................................................186 7.3. 嵌套的组件.........................................................................................................187 7.3.1. 局部转发.............................................................................................................187 7.3.2. 局部异常.............................................................................................................187 7.4. 玩转ActionMapping.........................................................................................188 7.5. 小结.....................................................................................................................188 8. 和女主角ACTION 对象共舞..................................................................190 8.1. 准备好了, 设定, 行动! .....................................................................................191 8.2. 搞定Action 对象...............................................................................................191 8.2.1. 什么是Action? ...................................................................................................192 8.2.2. Action 何时被调用? ..........................................................................................192 8.2.3. Action 做些什么? ...............................................................................................193 8.2.4. Action 象什么? ...................................................................................................199 8.3. 标准Action ........................................................................................................200 8.3.1. 标准桥式Action 类............................................................................................201 8.3.2. 标准 base Action................................................................................................203 8.3.3. SwitchAction.......................................................................................................208 8.4. 串链Action ........................................................................................................209 8.4.1. 来点新鲜的.........................................................................................................210 8.5. Scaffold Action...................................................................................................210 8.5.1. 仅作转发的Action............................................................................................. 211 8.5.2. Helper Action ......................................................................................................217 8.6. Base View Action ...............................................................................................220 8.7. Helper Action 技术...........................................................................................221 8.7.1. 可选转发.............................................................................................................221 8.7.2. 向前调用.............................................................................................................222 8.7.3. 捕获串链异常.....................................................................................................223 8.7.4. 智能错误转发.....................................................................................................225 8.7.5. 确认成功.............................................................................................................226 8.7.6. 替换视图.............................................................................................................226 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 8 页 http://www.blogjava.net/steelhand 8.7.7. 反射方法.............................................................................................................227 8.7.8. 反射类.................................................................................................................227 8.8. 使用智能转发.....................................................................................................228 8.9. 小结.....................................................................................................................233 9. 扩展 ACTIONSERVLET .......................................................................234 9.1. 来点实在的.........................................................................................................235 9.1.1. Servlet 三人帮....................................................................................................236 9.2. RequestProcessor ..............................................................................................237 9.2.1. process 方法.......................................................................................................238 9.2.2. processRoles........................................................................................................238 9.3. ExceptionHandler .............................................................................................239 9.4. PlugIn .................................................................................................................241 9.5. 小结.....................................................................................................................241 10. 显示动态内容......................................................................243 10.1. 标签—就是你.....................................................................................................244 10.1.1. JSP 标签—你到底好在哪里? ............................................................................244 10.1.2. Struts 和JSTL.....................................................................................................247 10.1.3. Struts 标签和MVC ............................................................................................248 10.2. 标签扩展.............................................................................................................249 10.2.1. 标签扩展是如何编写的? ...................................................................................249 10.2.2. 如何安装标签扩展? ...........................................................................................251 10.2.3. 标签不是什么.....................................................................................................253 10.3. Struts 标签库.....................................................................................................254 10.3.1. Struts 标签公共特征...........................................................................................254 10.3.2. Bean 标签...........................................................................................................256 10.3.3. Html 标签...........................................................................................................258 10.3.4. Logic 标签..........................................................................................................261 10.4. 使用Struts JSP 标签.........................................................................................263 10.4.1. Struts 标签.........................................................................................................264 10.4.2. 基础.....................................................................................................................264 10.4.3. 技术.....................................................................................................................273 10.4.4. 成功的控件.........................................................................................................287 10.5. 其他可代替的视图.............................................................................................288 10.5.1. Struts 和JSP .......................................................................................................288 10.5.2. Servlet 上下文....................................................................................................288 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 9 页 http://www.blogjava.net/steelhand 10.5.3. JSP 之外..............................................................................................................289 10.6. 小结.....................................................................................................................289 11. 用TILES 开发应用..............................................................291 11.1. 页面布局.............................................................................................................292 11.1.1. 动态模板的分层.................................................................................................292 11.1.2. 模板推论.............................................................................................................293 11.1.3. 使用模板.............................................................................................................293 11.1.4. 组合模板,Tiles 和Struts..................................................................................294 11.2. 构建一个布局模板.............................................................................................295 11.2.1. 但什么是小部件(tiles)? ................................................................................297 11.2.2. 部署Tiles 模板...................................................................................................298 11.2.3. 添加样式表.........................................................................................................300 11.2.4. 模板和MVC.......................................................................................................300 11.3. Tiles 定义(Definition)...................................................................................300 11.3.1. 声明Definition ...................................................................................................301 11.3.2. JSP 声明..............................................................................................................301 11.3.3. 通过JSP 声明一个Definition ...........................................................................301 11.3.4. 配置文件声明.....................................................................................................304 11.3.5. 将Definition 用作ActionForward .....................................................................306 11.4. Tile 属性(Attributess) ..................................................................................307 11.4.1. 使用属性.............................................................................................................307 11.4.2. 导入属性.............................................................................................................308 11.4.3. put .......................................................................................................................308 11.4.4. putList 和 add....................................................................................................310 11.5. 迁移一个应用到Tiles........................................................................................ 311 11.5.1. 设置 Tiles 框架................................................................................................ 311 11.5.2. 测试缺省配置.....................................................................................................312 11.5.3. 评估页面.............................................................................................................312 11.5.4. 使用重构页面................................................................................314 11.5.5. 分离 标签到Definition 中...........................................................321 11.5.6. 规格化基本布局.................................................................................................324 11.5.7. 将Definition 提炼到基本和扩展类之中...........................................................325 11.5.8. 开发过程.............................................................................................................326 11.5.9. 管理迁移.............................................................................................................327 11.6. 小结.....................................................................................................................327 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 10 页 http://www.blogjava.net/steelhand 12. 用户输入校验......................................................................329 12.1. 看到时我就认识它.............................................................................................330 12.1.1. 不能拒绝的输入.................................................................................................330 12.1.2. Web 层校验........................................................................................................331 12.1.3. 校验器的地位.....................................................................................................331 12.2. Struts 校验器概述............................................................................................333 12.2.1. Logon 示例........................................................................................................336 12.3. 基本校验器.........................................................................................................341 12.3.1. required 校验器.................................................................................................341 12.3.2. mask 校验器......................................................................................................341 12.3.3. range 校验器......................................................................................................343 12.3.4. maxLength 校验器.............................................................................................344 12.3.5. minLength 校验器.............................................................................................344 12.3.6. byte, short, integer, long, float, 和 double 校验器...........................................345 12.3.7. date 校验器........................................................................................................345 12.3.8. creditCard 校验器..............................................................................................346 12.3.9. email 校验器......................................................................................................346 12.4. 资源束.................................................................................................................346 12.4.1. 缺省资源束.........................................................................................................347 12.4.2. 缺省校验器消息.................................................................................................347 12.4.3. 定制校验器消息.................................................................................................348 12.5. 配置文件.............................................................................................................348 12.6. 校验器 JSP 标签..............................................................................................349 12.7. ValidatorForm 和 ValidatorActionForm ......................................................352 12.8. 本地化的校验.....................................................................................................353 12.9. 可插入校验器.....................................................................................................353 12.9.1. 创建可插入校验器.............................................................................................354 12.10. 技术.....................................................................................................................355 12.10.1. 多页面校验.........................................................................................................356 12.10.2. 取消按钮.............................................................................................................356 12.10.3. 定制消息.............................................................................................................356 12.10.4. 交叉相关的字段.................................................................................................357 12.10.5. 综合使用校验器和 validate 方法....................................................................359 12.11. 迁移一个应用到 Struts 校验器.......................................................................359 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 11 页 http://www.blogjava.net/steelhand 12.11.1. 设置校验器框架.................................................................................................359 12.11.2. 测试缺省配置.....................................................................................................360 12.11.3. 重审你的校验.....................................................................................................360 12.11.4. 扩展ValidatorForm 或者Scaffold BaseForm...................................................361 12.11.5. 选择一个校验来迁移.........................................................................................362 12.11.6. 添加formset, form, 和 field 元素....................................................................363 12.11.7. 向ApplicationResources 中加入新的条目........................................................363 12.11.8. 调用Struts 校验器.............................................................................................364 12.11.9. 测试并重复.........................................................................................................365 12.11.10. 删除ActionForm 超类......................................................................................366 12.12. 小结.....................................................................................................................368 13. 本地化.................................................................................369 13.1. 以另外的名称.....................................................................................................370 13.1.1. 为什么要本地化?.............................................................................................370 13.1.2. Java 国际化是如何工作的.................................................................................371 13.1.3. 场所(Locale)..................................................................................................371 13.1.4. ResourceBundle ..................................................................................................373 13.1.5. MessageFormat ...................................................................................................374 13.2. Struts 的国际化组件.........................................................................................375 13.2.1. 会话场所属性.....................................................................................................376 13.2.2. MessageResources ..............................................................................................376 13.2.3. 缺省资源束.........................................................................................................377 13.2.4. 格式化消息.........................................................................................................377 13.2.5. 显示特殊字符串.................................................................................................378 13.2.6. ActionErrors........................................................................................................378 13.2.7. ActionMessages ..................................................................................................379 13.2.8. 场所敏感的Struts JSP 标签...............................................................................380 13.3. 本地化Struts 应用............................................................................................386 13.3.1. 激活本地化.........................................................................................................386 13.3.2. 设置 locale servlet 参数....................................................................................386 13.3.3. 设置应用资源束参数.........................................................................................386 13.3.4. 使用框架的Locale 对象....................................................................................388 13.3.5. 检测用户场所.....................................................................................................388 13.3.6. 改变用户场所.....................................................................................................388 13.3.7. 使用Struts 场所敏感组件..................................................................................389 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 12 页 http://www.blogjava.net/steelhand 13.3.8. 将标志和消息放在资源属性文件中.................................................................389 13.3.9. 创建特定语言的属性文件.................................................................................389 13.3.10. 在本地化感知的组件中指定一个相应的关键字.............................................389 13.3.11. 使用和其他组件......................................................................389 13.4. 本地化其他组件.................................................................................................389 13.4.1. 本地化Struts Validator .......................................................................................389 13.4.2. 本地化Tiles........................................................................................................390 13.4.3. 本地化集合.........................................................................................................391 13.5. 小结.....................................................................................................................392 14. 在STRUTS 中使用数据服务...............................................394 14.1. 加快步伐.............................................................................................................395 14.1.1. 从模式的角度来看JDBC..................................................................................395 14.1.2. 数据服务介绍.....................................................................................................396 14.2. 业务层详解.........................................................................................................397 14.2.1. Struts—拿出你自己的模型................................................................................397 14.2.2. 定义业务对象.....................................................................................................397 14.2.3. 设计业务对象.....................................................................................................399 14.2.4. 设计结果.............................................................................................................399 14.2.5. 将业务与Action 混合 (不) ...............................................................................400 14.2.6. 一个简单例子.....................................................................................................400 14.3. 在Struts 中使用ProcessBean 和JDBC.........................................................401 14.3.1. 介绍ProcessBean ...............................................................................................402 14.3.2. ProcessBean 作为传输对象..............................................................................403 14.3.3. 组装ProcessBean ...............................................................................................404 14.3.4. 执行ProcessBean ...............................................................................................404 14.3.5. 访问数据服务.....................................................................................................405 14.3.6. 循着典型流程.....................................................................................................407 14.3.7. 编码业务活动.....................................................................................................407 14.3.8. ProcessBean 作为持久层..................................................................................410 14.3.9. 使用其它持久层技术......................................................................................... 411 14.4. 使用结果对象..................................................................................................... 411 14.4.1. ResultList 方法.................................................................................................. 411 14.5. 使用助手Action ................................................................................................413 14.6. 使用Lucene .......................................................................................................414 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 13 页 http://www.blogjava.net/steelhand 14.6.1. 再看searchProperties .........................................................................................415 14.7. 使用内容联合.....................................................................................................419 14.7.1. 摘要RSS.............................................................................................................419 14.7.2. 获取和渲染.........................................................................................................420 14.7.3. 联合RSS.............................................................................................................421 14.8. Struts 中使用EJB.............................................................................................423 14.8.1. 会话外观.............................................................................................................424 14.8.2. 数据传输对象.....................................................................................................424 14.8.3. 实现模式.............................................................................................................424 14.9. 小结.....................................................................................................................425 15. ARTIMUS:全力以赴实际应用..............................................426 15.1. 框架之框架.........................................................................................................427 15.2. Scaffold—工具包的诞生...................................................................................427 15.3. 关于Artimus .....................................................................................................428 15.3.1. 构建Artimus.......................................................................................................429 15.4. 部署描述符(web.xml)........................................................................................430 15.4.1. 配置Artimus.......................................................................................................432 15.4.2. 应用属性.............................................................................................................432 15.4.3. 连接适配器.........................................................................................................432 15.4.4. 启动优先级.........................................................................................................432 15.4.5. 其它配置设置.....................................................................................................432 15.4.6. 安全设置.............................................................................................................433 15.4.7. 我们所保护的URL............................................................................................433 15.4.8. 授权角色.............................................................................................................433 15.4.9. 认证策略.............................................................................................................433 15.5. ArtimusServlet...................................................................................................433 15.5.1. 我们的子类.........................................................................................................435 15.5.2. 我们的字符串常数.............................................................................................435 15.5.3. 我们的扩展点.....................................................................................................435 15.6. 应用和SQL 属性文件.......................................................................................436 15.7. index.jsp .............................................................................................................437 15.8. 全局转发.............................................................................................................438 15.9. /find/Recent........................................................................................................440 15.9.1. 扩展bean ............................................................................................................443 15.9.2. super.execute.......................................................................................................444 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 14 页 http://www.blogjava.net/steelhand 15.9.3. getArticles ...........................................................................................................444 15.9.4. 访问.findByLast 和ResultList ..........................................................................444 15.9.5. ProcessResult ......................................................................................................445 15.9.6. ProcessAction......................................................................................................446 15.10. tiles.xml 和Article.jsp......................................................................................447 15.10.1. useAttribute.........................................................................................................449 15.10.2. baseStyle .............................................................................................................450 15.10.3. title ......................................................................................................................450 15.10.4. Tiles.....................................................................................................................450 15.11. result.jsp.............................................................................................................452 15.11.1. legend..................................................................................................................454 15.11.2. isResult? ..............................................................................................................454 15.11.3. RESULT..............................................................................................................454 15.12. Article actions....................................................................................................460 15.13. view.jsp...............................................................................................................463 15.13.1. 大标题.................................................................................................................465 15.13.2. 内容.....................................................................................................................465 15.13.3. contributor...........................................................................................................465 15.14. edit.jsp ................................................................................................................466 15.14.1. 文章内容.............................................................................................................468 15.14.2. Contributed / contributor.....................................................................................469 15.14.3. Article ID ............................................................................................................469 15.14.4. Validation............................................................................................................469 15.15. /do/Menu ............................................................................................................471 15.15.1. logon ...................................................................................................................474 15.15.2. menu....................................................................................................................474 15.15.3. 我们的控件.........................................................................................................475 15.15.4. saveResult ...........................................................................................................476 15.15.5. Our results ...........................................................................................................476 15.16. menu.jsp.............................................................................................................476 15.16.1. /find/Hours ..........................................................................................................479 15.16.2. /menu/Find ..........................................................................................................479 15.16.3. /find/Last .............................................................................................................480 15.16.4. /menu/Contributor ...............................................................................................481 15.16.5. /menu/Manager ...................................................................................................482 15.17. 小结.....................................................................................................................482 16. 回家:迁移到STRUTS 1.1 ...................................................483 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 15 页 http://www.blogjava.net/steelhand 16.1. 下一站, Struts 1.1 ..........................................................................................484 16.1.1. Struts 1.1 特征摘要...........................................................................................485 16.1.2. 我们可使用的特征.............................................................................................487 16.2. 基线化变更.........................................................................................................487 16.2.1. Struts 1.1 的Tiles ...............................................................................................488 16.2.2. Struts 1.1 的Validator ........................................................................................491 16.2.3. Struts 1.1 的ReloadAction ................................................................................492 16.2.4. 其他对web.xml 和struts-config.xml 的基线变更...........................................492 16.2.5. message.jsp (1.1).................................................................................................492 16.2.6. form.jsp (1.1).......................................................................................................493 16.2.7. MenuCreate (1.1) ................................................................................................495 16.2.8. 向前.....................................................................................................................496 16.3. 任意修改.............................................................................................................496 16.3.1. 修改表单为DynaActionForm............................................................................496 16.3.2. 基于Action 的安全............................................................................................498 16.3.3. Action 路径修改.................................................................................................500 16.3.4. Struts 1.1 中的应用资源....................................................................................501 16.4. 小结.....................................................................................................................502 17. VELOCITY: JSP 的替代选择..............................................503 17.1. 转移到Velocity 模板........................................................................................504 17.2. 改变成就框架.....................................................................................................504 17.3. 我们为何需要Velocity ......................................................................................504 17.3.1. Velocity 轻巧、快速和多能.............................................................................505 17.3.2. Velocity 与其它和谐共处.................................................................................505 17.3.3. Velocity 简单而强大.........................................................................................505 17.4. 在Web 应用中使用Velocity ............................................................................505 17.4.1. 与其他Servlet 资源使用 Velocity....................................................................507 17.4.2. 通过上下文属性使用Velocity ..........................................................................508 17.4.3. Velocity 如何与Struts 共处..............................................................................509 17.4.4. VelocityStruts 工具包........................................................................................509 17.4.5. Struts View 工具.................................................................................................510 17.5. 我们的logon 模板............................................................................................510 17.6. 设置VelocityViewServlet..................................................................................513 17.6.1. 安装VelocityViewServlet ..................................................................................514 17.6.2. 部署Velocity servlet ..........................................................................................514 Struts in Action 中文版 Lastest Revised:10/14/2005 10:27:00 AM Translated By: Eric Liu(铁手) shqlau@hotmail.com(MSN) 第 16 页 http://www.blogjava.net/steelhand 17.6.3. 工具包配置文件.................................................................................................515 17.7. 设置struts 配置.................................................................................................516 17.8. 小结.....................................................................................................................518 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: Struts in Action 中文版
 输入关键字,在本站1000多万海量源码库中尽情搜索: