Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Apache Books Media Software Book Reviews

Professional Apache Tomcat 136

Liam writes "Tomcat is a subproject of the Apache Software Foundation's Jakarta project, its purpose being to serve Java Servlets and JavaServer Pages. It's a complex piece of software and though the documentation is very comprehensive, it helps to have a good reference work to hand. There aren't many books on the subject to choose from, so a publisher could make a fast buck putting out an incomplete work lacking in depth. Fortunately Wrox Press has done a great job with its new publication Professional Apache Tomcat." Read on for the rest of Liam's review.
Professional Apache Tomcat
author Chanoch Wiggers et al
pages 600
publisher Wrox Press Ltd
rating 9
reviewer Liam
ISBN 1861007736
summary Comprehensive guide to Apache's Tomcat server

The book covers every aspect of installing and configuring Tomcat in a great deal of depth, detailing its every aspect. From standalone use (where Tomcat is used as a general web server as well as for serving Java content), to integration with the leading web servers Apache (both Unix and Windows versions) and Microsoft's Internet Information Services, nothing appears to have been left out (however, integration with Netscape's Enterprise Server is mentioned in passing early on, but doesn't appear again).

Being only a month old, it's pretty much bang up to date, covering Tomcat 3.x, 4.0.x and 4.1.x with Apache 1.3.x and 2.0.x and IIS 4 and 5.

The book starts with an introduction to the Apache project, and Tomcat's place in the wider scheme of things. The historical progression in serving dynamic web content from CGI to Servlets and JSP is charted, and there's an overview of JSP tags and general web application architecture. This is interesting enough and useful as background, but as this book is intended for administrators, it's covered quickly in the first two chapters, and the main business of installing Tomcat gets underway in chapter 3.

Installation is discussed with both Windows and Linux users in mind, from both binary and source distributions. As the Tomcat source is usually built with Ant, build and installation of this tool is also discussed (Ant and Log4j, both also part of Jakarta, get chapters of their own later in the book). From there, basic configuration of the standalone server followed by detailed examinations of the components that make up Tomcat's architecture fills the next 200 or so pages.

Serious users of Tomcat will wish to employ Tomcat with an existing web server, and four chapters concentrate on this job. There is more emphasis on Apache than IIS, though given Apache's dominance of the web server field, this is understandable. There is inevitably a certain amount of detail aimed at Apache and IIS configuration, and a basic knowledge of both is assumed throughout. However, any necessary information is included in detail; for example the (Apache) connector modules mod_webapp and mod_jk/jk2 are given a thorough treatment, describing their use from source installation to configuration, together with the pros and cons of the various connectors available. Beyond that, we learn how to design larger-scale setups, with an explanation of load balancing techniques and scaling of the system, and performance testing with JMeter, yet another Jakarta project component.

As ever, security is a major concern and gets a lot of emphasis. Before client authentication and the use of SSL are discussed, there's an overview of basic system security with Unix and Windows. This should be teaching granny to suck eggs for a book aimed at administrators, but it's only a few pages and completes the subject. More interesting are the sections on security realms and user/client authentication. We are presented with examples of authenticating against a MySQL database with JDBC (database connectivity with JDBC is a big enough subject in its own right, and so gets a separate chapter too), and digest authentication. We then move on to encryption with SSL: using Tomcat itself with the JSSE and PureTLS Java SSL implementations, then later with Apache and SSL (setting up mod_ssl with Apache gets a very useful appendix of its own, taken from Professional Apache 2.0, another Wrox book). Again, there's lots of detail, right down to how to get hold of signed certificates for your server. Here the book's general emphasis on Apache over IIS is most apparent, as SSL with IIS is not discussed at all. However, I have no experience with IIS, so I can't say for sure how serious this omission might be.

There's a very brief appendix on setting up Apache's Axis SOAP toolkit, but without any mention of SOAP appearing elsewhere in the book. As other concepts are introduced so well, it's a curious addition.

With nine co-authors (though only four got onto the cover photograph - I wonder if they drew straws?), one might expect wildly different styles throughout the book, but each chapter is consistently and clearly laid out with diagrams and relevant configuration file fragments where necessary. There's little levity and it's all written in a very business-like manner, but then this is hardly a subject you'd choose for holiday reading.

Professional Apache Tomcat is surely the definitive book on the subject. I recently used it to integrate Tomcat 4 with an existing Apache 2 installation, and everything went very smoothly. More than just a set of tutorials, it offers a thorough description of the whole architecture, and makes an excellent companion to either of Wrox's Professional Apache books.

There's no CD with the book, but Wrox's website provides some support code, and there are lively forums for readers at p2p.wrox.com.


You can purchase Professional Apache Tomcat from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Professional Apache Tomcat

Comments Filter:
  • by dubious9 ( 580994 ) on Tuesday November 19, 2002 @12:15PM (#4706965) Journal
    Yes, tomcat is simple enough to begin using for yourself, but this book aims at the industrial uses of it.

    Documentation mostly tells you what a system does. Books (wrox, oreilly) mostly tell you how to set up a system to do what you want it to do, and explain uses that you might not have thought of.

    I like and respect the writers for wrox, and they wouldn't write about it if they didn't think it was useful.

    If you are thinking about intergrating JSPs or applets into your already existing complex web architechure, then I would probably buy a book that has professtionals outline exactly what to do, and what best practices there are.
  • Re:Tomcat is easy! (Score:4, Insightful)

    by monkeyserver.com ( 311067 ) on Tuesday November 19, 2002 @12:23PM (#4707045) Homepage Journal
    That might be true, but there are countless companies that have NO sysadmin. You have, instead, an overworked project manager who has been forced to work on IIS w/ some piece of crap Servlet Container for the last umpteen years. Now that he's convinced management to let him run linux and tomcat w/ apache he has very little time to set it up, and not a ton of experience. He would benifit greatly from this.

    And don't, for a second, believe that most ppl know as much as your average slashdot posting geek. This book can be very helpful to those who would like a little hand holding. It also might give even you some insight into things you haven't done or haven't even thought of...
  • Re:Nice to see (Score:4, Insightful)

    by GOD_ALMIGHTY ( 17678 ) <curt.johnson@nospAM.gmail.com> on Tuesday November 19, 2002 @12:53PM (#4707296) Homepage
    I don't think any of the generic Servlet/JSP books are much more helpful than explaining the spec's from Sun. They introduce basic patterns and such, but don't do much to help with taking advantage of the architecture while maintaining portability. Tomcat 4.1.x has caching features that will break 'loosely' written code that would work using Jasper on Jetty. The spec doesn't say you can't do these things, but developers need better guidence on what to keep in mind while writing code that needs to be portable, versus just writing for a specific container.

    My experience has been that Tomcat does things the 'right way' where others gloss over ambiguities in the spec. Having a detailed explination, with examples on how to write code 'the right way' so that Tomcat will be happy, makes the job of porting to other containers easier.

    The 4.1.x stuff seems to be a refactoring of previous versions that continues to enforce best practices to insure data integrity and scalability. The problem is, I need to be able to figure this out without having to read through the source. I don't mind it when I run up against issues and need to understand what's happening internally (I've read a ton of the jakarta-commons and struts taglib source), but to have a 'developer's guide' that does more than cover the basics of JSP/servlet development would be very helpful.
  • Re:Tomcat is easy! (Score:5, Insightful)

    by deppe ( 27130 ) on Tuesday November 19, 2002 @01:07PM (#4707427)
    For the casual developer or admin, I think the new Sun-endorsed XML formats for webtrees and other configuration data is worthless. It's simply too verbose for me.

    I recently played with Cocoon (which is a lovely publishing framework) but finally gave up with writing my own "mini-framework" with it because of the awkward XML configuration files.

    Don't get me wrong, I love XML for what it is good at, data exchange and such applications, but the idea that _everything_ has to be in XML isn't a useful one (IMHO).
  • by j3110 ( 193209 ) <samterrellNO@SPAMgmail.com> on Tuesday November 19, 2002 @01:08PM (#4707443) Homepage
    Try a different JVM if at all possible.. If not, you can configure the JVM to compile useing jikes. The problem you probably have is that the toy compiler that comes with the JDK that's written partially in java, turns out to leek memory (just enough to be annoying if you have a lot of JSPs). There are how-to's online for setting up jikes and tomcat. This issue has been known for a while, but SUN nor Tomcat feel like it's a big enough issue to get upset about. You could also have a look at Jetty which is faster than Tomcat and more stable and yet easier to set up.
  • Tomcat Speed (Score:2, Insightful)

    by markv242 ( 622209 ) on Tuesday November 19, 2002 @01:23PM (#4707622)
    Does the book have a chapter on optimizing Tomcat's threads to provide better performance than the out-of-the-box installation? If not, then don't bother buying the book.

    Instead, use the money to license a copy of Resin [caucho.com] which is, for lack of a better description, Tomcat on Nitro. It follows the reference implementation of JSP and Servlets just as well as Tomcat does, and even the default configuration, which is tuned for development, outperforms Tomcat.

    The configuration of Resin is almost exactly like the config of Tomcat, so I honestly don't see why you'd pick Tomcat over Resin (unless you were having trouble getting the 1.2 or 1.3 JDK installed on your FreeBSD box, something that is historically difficult to do).

  • by jfsather ( 310648 ) on Tuesday November 19, 2002 @02:07PM (#4708136) Homepage
    Actually, if you subscribe to the user mailing list I don't think you'd say this. I managed to get by with just the online documentation and google, but is seems like there are quite a few people who can't. Every day we get asked about Apache/Tomcat binding and help with various server.xml and web.xml problems.

    I never understand how some people can't use the resources available. Hell, the mailing list archive is online and people can't figure out that they should search there before asking the list. The list is running at about 50+ messages a day. Obviously someone needs this book.
  • Re:Tomcat is easy! (Score:2, Insightful)

    by seanb ( 27295 ) on Tuesday November 19, 2002 @02:31PM (#4708471) Homepage Journal
    Tomcat doesn't require (or imply) linux. It works well under Windows, OS X, or anything with a viable J2SE runtime.

Be careful when a loop exits to the same place from side and bottom.

Working...