I originally noticed the Jakarta Commons libraries while working with Apache Jakarta Tomcat. At some point, Tomcat started to include a suite of small libraries with commons in the name. They started to show up everywhere, in all sorts of other open-source projects. At first, it was slightly off-putting—what exactly is commons-lang.jar, and why is this tiny library showing up in all of my software?
Exploring the Jakarta Commons, I first found a broad suite of what I would characterize as “utility” code—things that often wound up in my software in packages named things like “util.” Digging deeper, I found useful libraries to solve common problems, interesting algorithms, and more. In brief, by using the Jakarta Commons, I found I spent less time reinventing the wheel, and more time solving the problem at hand.
Virtually every Java developer can take advantage of various Jakarta Commons components—from the utilities provided by the Collections and Lang packages, through the networking components afforded by the HttpClient and Net packages. These components underlie Apache Tomcat, Struts, and countless other projects, helping move forward both the Java industry and the Java platform.
The first few chapters cover the more web-specific packages, including FileUpload, HttpClient, and the Net suite of protocol implementations. The Pool and DBCP packages are useful for a broader range of applications. BeanUtils and JXPath provide easier ways to work with objects. Logging, Lang, and Collections are a suite of tools applicable to almost every application. Codec provides a suite of specialized conversion routines, useful for data transfer, security, and (interestingly) phonetic analysis. Finally, the CLI package provides support for building command-line applications.