Programming Jakarta Struts, 2/e
暫譯: 編程 Jakarta Struts, 第二版

Chuck Cavaness

  • 出版商: O'Reilly
  • 出版日期: 2004-07-01
  • 售價: $1,730
  • 貴賓價: 9.5$1,644
  • 語言: 英文
  • 頁數: 550
  • 裝訂: Paperback
  • ISBN: 0596006519
  • ISBN-13: 9780596006518
  • 已過版

買這商品的人也買了...

相關主題

商品描述

Description:

While the look and feel of an enterprise web application is certainly important, developers usually find themselves spending far too much time on the front-end presentation before they can get to coding the good stuff--the business logic at the heart of the program. Jakarta Struts addresses this issue by combining Java Servlets, Java ServerPages (JSP), custom tags, and messaging resources (like Java Message Service) into a unified, re-usable framework. The result is a cooperative, synergistic platform that's efficient and suitable for independent developers, large development teams, and everyone in between.

The Struts Framework has become a highly popular open source project, but there's still woefully little documentation on the technology. What does exist is far too basic and lacks critical information for developers like you writing today's complex web applications.

The revised and expanded Programming Jakarta Struts, 2nd Edition covers everything the successful earlier edition did--including an overview of the concepts involved in writing web applications; installation and configuration instructions for getting Struts up and running; a thorough discussion of how Struts implements the Model-View-Controller (MVC) design paradigm (known as the Model 2 approach) and how to interface with that pattern in your own applications; Logging, Validation, and Exception Handling with Struts; using Tiles; writing internationalization and localization code using Struts; and practical, real-world best practices for web applications--as well as plenty more: now fully up to date with Struts 1.1, this edition covers the latest material on tag libraries and the new JavaServerFaces (JSF) APIs and even includes all-new chapters on JSF, JSTL/EL, and security.

With each enterprise system he s developed, author Chuck Cavaness has spent many grueling hours learning invaluable lessons about Struts and figuring out the dos and the don'ts of building web applications. He saves you time and headaches by sharing that invaluable real-world experience here, with his realistic, practical, here's how to do it approach to using the Struts Framework to its fullest potential.

 

Table of Contents:

Preface

1. Introduction
     A Brief History of the Web
     What Are Java Servlets?
     JavaServer Pages
     JSP Model 1 and Model 2 Architectures
     Why Is Model-View-Controller So Important?
     What Is a Framework?
     Alternatives to Struts

2. Inside the Web Tier
     An Architecture Overview
     The HTTP Request/Response Phase
     Struts and Scope
     Using URL Parameters
     Forward Versus Redirect

3. Overview of the Struts Framework
     A Banking Account Example
     Looking at the Big Picture
     Struts Controller Components
     Struts Model Components
     Struts View Components
     Multiple Application Support
     Summary

4. Configuring Struts Applications
     The Storefront Application
     What Is a Web Application?
     The Web Application Directory Structure
     The Web Application Deployment Descriptor
     Configuring the web.xml File for Struts
     The Struts Configuration File
     The Digester Component
     The Struts Console Tool
     Reloading the Configuration Files

5. Struts Controller Components
     The Controller Mechanism
     The Utilities Classes

6. Struts Model Components
     The "M" in MVC
     What Is a Business Object?
     Persistence
     What Does Struts Offer for the Model?

7. Struts View Components
     What Is a View?
     What Are ActionForms?
     Using ActionErrors
     Performing Presentation Validation
     Using the DynaActionForm Class
     Looking Ahead to JavaServer Faces

8. JSP Custom Tag Libraries
     Custom Tags Overview
     Tag Libraries Included with Struts
     Using JavaBeans with Struts Tags
     Struts HTML Tags
     Logic Tags
     Bean Tags
     Nested Tags
     Other Useful Tag Libraries
     The JSP Standard Tag Library (JSTL)

9. Extending the Struts Framework
     What Are Extension Points?
     General Extension Points
     Controller Extension Points
     Extending View Components
     Downsides to Extending the Framework

10. Exception Handling
     Java Exception Handling
     Performance Impact of Exception Handling
     System Versus Application Exceptions
     Using Chained Exceptions
     Exception Handling Provided by Struts
     Tying Up the Loose Ends
     Conclusion

11. The Validator Framework
     The Need for a Validation Framework
     Installing and Configuring the Validator
     Using an ActionForm with the Validator
     Creating Your Own Validation Rules
     The Validator and JSP Custom Tags
     Internationalizing the Validation
     Using the Validator Outside of Struts

12. Internationalization and Struts
     What Is Internationalization?
     Support for I18N in Java
     Internationalizing Your Struts Applications
     Exception Handling and Internationalization

13. Struts and Enterprise JavaBeans
     Implementing the Storefront Service Using EJB
     Interfacing Struts to EJB
     Conclusion

14. Using Tiles
     Understanding Templates
     Installing and Configuring Tiles
     Using Tiles
     The Tiles Tag Library
     Using Definitions
     Internationalization Support with Tiles

15. Logging in a Struts Application
     Logging in a Web Application
     Using the Servlet Container for Logging
     Jakarta Commons Logging
     Using the log4j Package
     Using Commons Logging in JSP Pages
     The Performance Impact of log4j
     Third-Party log4j Extensions
     Java 1.4 Logging API

16. Packaging Your Struts Application
     To Package or Not to Package
     Packaging the Application as a WAR File
     Building Your Struts Applications with Ant
     Creating an Automated Build Environment
     Restarting Your Server Remotely

17. Addressing Performance
     What Is Good Performance?
     Performance Versus Load Testing
     Performance- and Stress-Testing Tools
     Testing the Storefront Application
     Performance and Scalability Gotchas

18. JavaServer Faces
     Struts and JavaServer Faces
     Overview of JSF Architecture
     Installing and Running the Example Struts-Faces Application
     Converting Existing Struts Applications to JSF
     Further Reading

A. Changes Since Struts 1.0

B. Downloading and Installing Struts

C. Resources

Index

商品描述(中文翻譯)

描述:


雖然企業網頁應用程式的外觀和感覺確實很重要,但開發人員通常發現自己在前端展示上花費了過多的時間,才得以開始編寫真正重要的程式碼——即程式的核心業務邏輯。Jakarta Struts 解決了這個問題,通過將 Java Servlets、Java ServerPages (JSP)、自定義標籤和消息資源(如 Java Message Service)結合成一個統一的可重用框架。其結果是一個協作的、協同的平臺,對獨立開發者、大型開發團隊及其間的所有人都高效且適用。

Struts 框架已成為一個非常受歡迎的開源專案,但對於這項技術的文檔仍然非常匱乏。現有的文檔過於基礎,缺乏對於像您這樣的開發人員在編寫當今複雜網頁應用程式時所需的關鍵資訊。

修訂和擴展的 Programming Jakarta Struts,第二版涵蓋了成功的早期版本所包含的一切——包括編寫網頁應用程式所涉及的概念概述;安裝和配置 Struts 的指導;對 Struts 如何實現模型-視圖-控制器 (MVC) 設計範式(稱為模型 2 方法)的徹底討論,以及如何在自己的應用程式中與該模式進行接口;使用 Struts 的日誌記錄、驗證和異常處理;使用 Tiles;使用 Struts 編寫國際化和本地化代碼;以及針對網頁應用程式的實用、現實世界最佳實踐——還有更多:本版完全更新至 Struts 1.1,涵蓋了有關標籤庫和新的 JavaServer Faces (JSF) API 的最新材料,甚至包括全新的 JSF、JSTL/EL 和安全性章節。

隨著他所開發的每一個企業系統,作者 Chuck Cavaness 花費了許多艱辛的時光學習有關 Struts 的寶貴經驗,並弄清楚構建網頁應用程式的注意事項和禁忌。他在這裡分享了這些寶貴的現實世界經驗,幫助您節省時間和精力,並以現實、實用的方式告訴您如何充分利用 Struts 框架的潛力。


 


目錄:

前言

1. 介紹

     網路的簡史

     什麼是 Java Servlets?

     JavaServer Pages

     JSP 模型 1 和模型 2 架構

     為什麼模型-視圖-控制器如此重要?

     什麼是框架?

     Struts 的替代方案

2. 網頁層內部

     架構概述

     HTTP 請求/響應階段

     Struts 和範圍

     使用 URL 參數

     轉發與重定向

3. Struts 框架概述

     銀行帳戶範例

     從大局看

     Struts 控制器組件

     Struts 模型組件

     Struts 視圖組件

     多應用程式支持

     總結

4. 配置 Struts 應用程式

     商店應用程式

     什麼是網頁應用程式?

     網頁應用程式目錄結構

     網頁應用程式部署描述符

     為 Struts 配置 web.xml 檔案

     Struts 配置檔案

     Digester 組件

     Struts 控制台工具

     重新加載配置檔案

5. Struts 控制器組件

     控制器機制

     工具類

6. Struts 模型組件

     MVC 中的 'M'

     什麼是業務對象?

     持久性

     Struts 為模型提供了什麼?

7. Struts 視圖組件

     什麼是視圖?

     什麼是 ActionForms?

     使用 ActionErrors

     執行展示驗證

     使用 DynaActionForm 類

     展望 JavaServer Faces

8. JSP 自定義標籤庫

     自定義標籤概述

     Struts 附帶的標籤庫

     使用 JavaBeans 與 Struts 標籤

     Struts HTML 標籤

     邏輯標籤

     Bean 標籤

     嵌套標籤

     其他有用的標籤庫

     JSP 標準標籤庫 (JSTL)

9. 擴展 Struts 框架

     什麼是擴展點?

     一般擴展點

     控制器擴展點

     擴展視圖組件

     擴展框架的缺點

10. 異常處理

     Java 異常處理

     異常處理的性能影響

     系統與應用程式異常

     使用鏈式異常

     Struts 提供的異常處理

     解決遺留問題

     結論

11. 驗證器框架

     驗證框架的需求

     安裝和配置驗證器

     使用 ActionForm 與驗證器

     創建自己的驗證規則

     驗證器與 JSP 自定義標籤

     驗證的國際化

     在 Struts 之外使用驗證器

12. 國際化與 Struts

     什麼是國際化?

     Java 中的 I18N 支持

     國際化您的 Struts 應用程式

     異常處理與國際化

13. Struts 與企業 JavaBeans

     使用 EJB 實現商店服務

     將 Struts 與 EJB 進行接口

     結論

14. 使用 Tiles

     理解模板

     安裝和配置 Tiles

     使用 Tiles

     Tiles 標籤庫

     使用定義

     Tiles 的國際化支持

15. 在 Struts 應用程式中記錄

     在網頁應用程式中記錄

     使用 Servlet 容器進行記錄

     Jakarta Commons Logging

     使用 log4j 套件

     在 JSP 頁面中使用 Commons Logging

     log4j 的性能影響

     第三方 log4j 擴展

     Java 1.4 記錄 API

16. 打包您的 Struts 應用程式

     打包或不打包

     將應用程式打包為 WAR 檔案

     使用 Ant 構建您的 Struts 應用程式

     創建自動化構建環境

     遠程重啟您的伺服器

17. 解決性能問題

     什麼是良好的性能?

     性能與負載測試

     性能和壓力測試工具

     測試商店應用程式

     性能和可擴展性的注意事項

18. JavaServer Faces

     Struts 與 JavaServer Faces

     JSF 架構概述

     安裝和運行示例 Struts-Faces 應用程式

     將現有的 Struts 應用程式轉換為 JSF

     進一步閱讀

A. 自 Struts 1.0 以來的變更

B. 下載和安裝 Struts

C. 資源

索引