Apache Jakarta Commons: Reusable Java™ Components

Book description

  • Easy-to-follow coverage of twelve indispensable Jakarta Commons packages

  • Code examples that show innovative uses of Commons components, including using HttpClient to access Web resources, FileUpload for handling HTTP file uploads, and BeanUtils for easy form generation

  • Detailed instructions for combining the Commons project libraries with the popular Eclipse IDE

  • Save time and money with reusable open source Java™ components

    Master the Jakarta Commons Library of Open Source JavaTM Components

    Using the Apache Jakarta Commons reusable Java™ components, you can leverage the work of the global open-source community to solve common programming problems reliably, quickly, and inexpensively. But, to use the Commons libraries effectively, you need far more guidance than the official documentation offers. In Apache Jakarta Commons: Reusable Java™ Components, Will Iverson covers what Java developers need to know to take full advantage of Jakarta Commons—starting right now.

    Iverson begins with a definitive overview of the Commons project: goals, installation, and getting started with Commons components. Next, he presents example-rich chapters on the twelve most useful Commons packages, covering topics ranging from HTTP FileUpload to database connectivity. Iverson provides detailed code samples for every component he describes. After you've mastered the core Jakarta Commons packages, you'll constantly rely on this book's handy seventy-five page quick-reference. Iverson's coverage includes

  • Downloading Commons project libraries and installing them into Eclipse

  • Programmatically accessing resources via HTTP, FTP, NNTP, and other Internet protocols

  • Using the Jakarta Commons suite of configurable object pools

  • Managing database connectivity in Swing applications—and anywhere containers aren't doing it for you

  • Using BeanUtils to generate forms and gain runtime access to information provided by JavaBeans-style objects

  • Traversing complex object graphs with JXPath

  • Using Jakarta Commons' advanced collections tools to establish richer object relationships

  • Extending java.lang with better methods for manipulating core classes

  • Implementing conversion routines, configurable logging, command-line help, and more

  • Exploring the newest packages, including emerging "sandbox" packages

  • Whether you're building code for front-end Web applications, client-side software, or back-end servers, learning Jakarta Commons will make you far more efficient. Apache Jakarta Commons is the fastest way to master and get results with Commons.

    About the Web Site

    All of the book's sample Java programs are available for download from: http://www.cascadetg.com/commons/.

    © Copyright Pearson Education. All rights reserved.

    Table of contents

    1. Copyright
      1. Dedication
    2. Bruce Perens’ Open Source Series
    3. About Prentice Hall Professional Technical Reference
    4. Preface
    5. Acknowledgments
    6. About the Author
    7. 1. Overview
      1. Proper Versus Sandbox
      2. License
      3. Obtaining and Installing
      4. Configuration Under Eclipse
      5. From Here
    8. 2. FileUpload
      1. Web and User Interfaces
      2. FileUpload Design
      3. Building an Application With FileUpload
        1. FileUpload Application User Interface
      4. Sample FileUpload Application Code
        1. Application Presentation
        2. Application Logic
      5. Limitations and Security Issues
      6. Summary
    9. 3. HttpClient
      1. A Simple Cookie-Based Web Site
      2. Understanding HttpClient
      3. Simple Swing Client
        1. Swing Client User Interface
        2. Swing Client Code
      4. Summary
    10. 4. Net
      1. Net Overview
      2. FTP Functionality
      3. FTP Implementation
      4. NNTP Functionality
      5. NNTP Implementation
      6. Summary
    11. 5. Pool
      1. Interfaces and Implementation
      2. Thread Pool Example
      3. Object Factory Example
      4. Worker Thread
      5. Summary
    12. 6. DBCP (Database Connection Pool)
      1. Standalone Datasources
        1. Client Connectivity
        2. Building the DataSource
      2. Legacy JDBC Driver
      3. Summary
    13. 7. BeanUtils
      1. Understanding BeanUtils
      2. Using BeanUtils to Generate Forms
        1. Sample JavaBeans
        2. Presenting the Form
        3. FormBean
        4. FormBeanUtils
      3. Summary
    14. 8. JXPath
      1. Setting up the Example Object Graph
      2. Exploring the Hierarchy
      3. XPath and JXPath Syntax
        1. Basic XPath
        2. Complex XPath
        3. JXPath Extensions
      4. Supported Data Types
      5. Summary
    15. 9. Logging
      1. Trace Levels
      2. Using Logging
      3. Logging Output
      4. Summary
    16. 10. Lang
      1. Base Lang Classes
        1. ArrayUtils
        2. BitField
        3. BooleanUtils
        4. CharRange, CharSet, and CharSetUtils
        5. ClassUtils
        6. ObjectUtils and ObjectUtils.Null
        7. RandomStringUtils
        8. SerializationUtils
        9. StringEscapeUtils
        10. StringUtils
        11. SystemUtils
        12. Validate
        13. WordUtils
      2. Builder
      3. Enum
      4. Exception
      5. Math
      6. Time
      7. Summary
    17. 11. Collections
      1. Collections Concepts
        1. Bag
        2. Bean
        3. BidiMap
        4. Blocking
        5. Bounded
        6. Buffer
        7. Circular
        8. Closure
        9. Collating
        10. Comparator
        11. Composite
        12. Cursorable
        13. Factory
        14. Fast
        15. Fifo
        16. FixedSize
        17. Flat3
        18. Functor
        19. Hash
        20. Identity
        21. Lazy
        22. Linked
        23. List
        24. LRU
        25. Map
        26. Multi
        27. NodeCaching
        28. ObjectGraph
        29. Ordered
        30. Predicate
        31. Reference
        32. Set
        33. Singleton
        34. StaticBucket
        35. Synchronized
        36. Transformed/Transformer
        37. Typed
        38. Unmodifiable
      2. Summary
    18. 12. Codec
      1. Character Encodings
      2. Base64 Encoding
      3. Url Form Encoding
      4. Hash Generation
      5. Phonetic Analysis
      6. Summary
    19. 13. CLI (Command-Line Interface)
      1. Classpathtool Overview
      2. Building a Command-Line Interface
      3. Running Command Line
      4. Behind the Scenes with Classpathtool
      5. Summary
    20. 14. Other Projects
      1. Additional Commons Proper Projects
        1. Betwixt
        2. Chain
        3. Configuration
        4. Daemon
        5. DbUtils
        6. Digester
        7. Discovery
        8. EL
        9. IO
        10. Jelly
        11. Jexl
        12. Latka
        13. Launcher
        14. Math
        15. Modeler
        16. Primitives
        17. Validator
      2. Sandbox Projects
        1. Attributes
        2. Cache
        3. Clazz
        4. Compress
        5. Convert
        6. Email
        7. Events
        8. FeedParser
        9. Functor
        10. Id
        11. JJar
        12. Mapper
        13. Messenger
        14. Resources
        15. Scaffold
        16. SQL
        17. ThreadPool
        18. Transaction
        19. VFS
        20. Workflow
      3. Summary
    21. A. Lang Reference
      1. org.apache.commons.lang
      2. org.apache.commons.lang.ArrayUtils
        1. Constructor Detail
        2. Method Detail
      3. org.apache.commons.lang.BitField
        1. Constructor Detail
        2. Method Detail
      4. org.apache.commons.lang.BooleanUtils
        1. Constructor Detail
        2. Method Detail
      5. org.apache.commons.lang.CharRange
        1. Constructor Detail
        2. Method Detail
      6. org.apache.commons.lang.CharSet
        1. Field Summary
        2. Method Detail
      7. org.apache.commons.lang.CharSetUtils
        1. Constructor Detail
        2. Method Detail
      8. org.apache.commons.lang.ClassUtils
        1. Field Detail
        2. Constructor Detail
        3. Method Detail
      9. org.apache.commons.lang.ObjectUtils
        1. Nested Class Summary
        2. Field Detail
        3. Constructor Detail
        4. Method Detail
      10. org.apache.commons.lang.ObjectUtils.Null
      11. org.apache.commons.lang.RandomStringUtils
        1. Constructor Detail
        2. Method Detail
      12. org.apache.commons.lang.SerializationUtils
        1. Constructor Detail
        2. Method Detail
      13. org.apache.commons.lang.StringEscapeUtils
        1. Constructor Detail
        2. Method Detail
      14. org.apache.commons.lang.StringUtils
        1. Field Detail
        2. Constructor Detail
        3. Method Detail
      15. org.apache.commons.lang.SystemUtils
        1. Field Detail
        2. Constructor Detail
        3. Method Detail
      16. org.apache.commons.lang.Validate
        1. Constructor Detail
        2. Method Detail
      17. org.apache.commons.lang.WordUtils
        1. Constructor Detail
        2. Method Detail
      18. org.apache.commons.lang.time
        1. Class Summary
      19. org.apache.commons.lang.time.DateFormatUtils
        1. Constructor Detail
        2. Method Detail
      20. org.apache.commons.lang.time.DateUtils
        1. Field Detail
        2. Constructor Detail
        3. Method Detail
      21. org.apache.commons.lang.time.FastDateFormat
        1. Nested Class Summary
        2. Field Detail
        3. Method Detail
      22. org.apache.commons.lang.time.StopWatch
        1. Constructor Detail
        2. Method Detail
    22. B. Apache License, Version 2.0
      1. Appendix: How to Apply the Apache License to your Work

    Product information

    • Title: Apache Jakarta Commons: Reusable Java™ Components
    • Author(s): Will Iverson
    • Release date: February 2005
    • Publisher(s): Pearson
    • ISBN: 9780131478305