- Shopping Bag ( 0 items )
Ships from: Chatham, NJ
Usually ships in 1-2 business days
Used together with Web servers such as Apache and IIS, it adds powerful dynamic response capabilities to their repertoire. As an HTTP server, Tomcat can also be useful alone during Web application development.
The Apache Software Foundation is a membership-based, not-for-profit corporation that exists to take care of several of these open-source software projects, including Apache Server. Our book depends heavily upon two Apache projects: the Jakarta Project and the Apache XML Project. This chapter talks about Tomcat, which is the main product from the Jakarta Project. The next chapter talks about Xerces and Xalan, two of several products from the Apache XML Project.
If you are not already familiar with the Apache Software Foundation, we urge you to visit its Web site, which you can find at
Following the links from this Web site, you can learn about the various Apache projects and also the people responsible for them. You can also find out how you can play a part in this dynamic development phenomenon.
The Jakarta Tomcat project goal is to create a world-class implementation of the Java Servlet 2.2 and JavaServer Pages 1.1 specifications. Tomcat, the main product of its open-source development efforts, is, in fact, the reference implementation for those specifications.
Tomcat can be used to extend other HTTP servers, such as the popular Apache Server, enabling them to handle requests for both Java servlets and JavaServer Pages. Tomcat Server can also be used as a standalone HTTP server. We will frequently refer to Tomcat in this book simply as "the server," but keep in mind that it is usually used in tandem with another Web server.
This popularity gives Tomcat another advantage related to developer support. So many people are using and enhancing Tomcat that help requests posted to its mailing lists are answered very quickly. Support is often faster and better than it is for commercial products.
On the other hand, Tomcat can be used in standalone mode, without Apache (or another Web server). This means that you can use Tomcat alone (as we will in this book) to develop Web applications that will later be hosted by another server plus Tomcat. This also means that you can even build Tomcat itself into a Web-enabled product as both an HTTP server and a servlet and JSP engine. Note that, in that case, you probably will want to also include with your product the Jikes compiler, which is freely redistributable.
The text of the Xerces and Xalan licenses is reproduced with the source code at the end of this book.
You can get a Tomcat distribution from the CD-ROM provided with this book. Otherwise, download it from the Web.You can start at
The following discussion assumes that you will use version 3.2.1. There are both binary and source downloads available for Tomcat. To use Tomcat, you need only the binary download. However, if you have the necessary resources, we recommend that you get both the binary and the source downloads. You can benefit from having the source code for the Tomcat servlet and the JSP container. The source download also gives you important information about running Tomcat together with Apache Server or Microsoft IIS. The download files for Windows are named
jakarta-tomcat-3.2.1.zip and jakarta-tomcat-3.2.1-src.zip.
The API documentation for Java servlets and JSPs is also very useful to have on hand. Note that the basic 3.2 distributions don't include these, but you can find them at
If your Java SDK is installed in
c:\jdk1.3, you will have Tomcat conveniently close to it in an explorer display that is sorted alphabetically. That is a pretty good reason not to simplify jakarta-tomcat to tomcat.
You can also browse the user guide on the Jakarta Web site along with some other helpful Tomcat documentation. Try
Use its user guide to get Tomcat running on your system.We gave up trying to provide comprehensive instructions for the Apache products. A colleague said it best: "Don't try to document other peoples' software!" However, we will give some minimal instructions, as well as some advice that might help sometimes—at least until it too becomes obsolete.
For more information about IIS, you can visit the Microsoft Web site
It is not difficult to set up Tomcat to work together with IIS, enabling it to respond to requests for Java servlets and JSP pages. Doing so involves adding a DLL file and some registry keys to your system, and then adding an ISAPI filter to IIS and rebooting it. Complete instructions can be found in the Tomcat user guide, or online at
The DLL that you need is the ISAPI redirector server plug-in
isapi_redirect.dll, which is available online and also on the CD-ROM for this book in the folder
You can quite easily configure Tomcat to work with the Apache Web server. That usually means that Apache will listen to incoming requests and forward those for JSPs and Java servlets to Tomcat. Complete instructions can be found in the Tomcat user guide mentioned previously and also online at
Note that this HTML file is also available in the Tomcat source distribution file. In addition, you will need a DLL file called ApacheModuleJServ.dll, which is available online. The latest version available to us is on the CD-ROM for this book, in the folder
We will not repeat here the information from the user guide and other HTML documents, but we will mention one item that confused us when we set up Apache and Tomcat together. There is a "correct" version of
ApacheModuleJServ.dll, which you can get from the Tomcat download Web page. There is another "wrong" version of this file that is for use with another program called JServ, which, like Tomcat, is also a Java servlet container.
That "wrong" DLL might actually be among the Apache Server modules, which are in something like the folder
c:\program files\Apache Group\Apache\modules. Make sure that the "correct" version is in that folder to use Tomcat instead of JServ....
|1||Introduction and Requirements||1|
|2||An Environment for Java Software Development||15|
|3||Java Servlets and JavaServer Pages: Jakarta Tomcat||35|
|4||XML and XSLT: Xerces and Xalan||61|
|5||bonForum Chat Application: Use and Design||77|
|6||bonForum Chat Application: Implementation||103|
|7||JavaServer Pages: The Browseable User Interface||155|
|8||Java Servlet and Java Bean: BonForumEngine and BonForumStore||189|
|9||Java Applet Plugged In: BonForumRobot||285|
|10||JSP Taglib: The bonForum Custom Tags||303|
|11||XML Data Storage Class: ForestHashtable||385|