XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application

Overview

The book is a practical, hands-on experience in building web applications based on XML and Java technologies. This book is unique because it teaches the technologies by using them to build a web chat project throughout the book. The project is explained in great detail, after the reader is shown how to get and install the necessary tools to be able to customize this project and build other web applications. The tools that are used are the extremely popular open-source tools from the Apache Software Foundation, ...
See more details below
Available through our Marketplace sellers.
Other sellers (Multimedia Set)
  • All (19) from $1.99   
  • New (4) from $32.49   
  • Used (15) from $1.99   
Close
Sort by
Page 1 of 1
Showing 1 – 2 of 4
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$32.49
Seller since 2014

Feedback rating:

(278)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(177)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing 1 – 2 of 4
Close
Sort by
Sending request ...

Overview

The book is a practical, hands-on experience in building web applications based on XML and Java technologies. This book is unique because it teaches the technologies by using them to build a web chat project throughout the book. The project is explained in great detail, after the reader is shown how to get and install the necessary tools to be able to customize this project and build other web applications. The tools that are used are the extremely popular open-source tools from the Apache Software Foundation, namely Jakarta Tomcat, Apache Xerces and Apache Xalan. Of particular interest to readers will be the author's use in of XML in the book project as a language to express the architecture and design of the application itself, and not only the data content as is the usual case with “XML-based” applications. The book also contains some new and provocative techniques for XML storage using Java objects. This book will be especially useful for those developers who are interested in deploying web applications using Apache Jakarta and XML products on Windows platforms, but can be used by all web application developers.
Read More Show Less

Product Details

  • ISBN-13: 9780735710894
  • Publisher: New Riders
  • Publication date: 8/7/2001
  • Series: Landmark Series
  • Edition description: BK&CD-ROM
  • Pages: 746
  • Product dimensions: 7.06 (w) x 8.98 (h) x 1.64 (d)

Meet the Author

Westy Rockwell is a Senior Developer at tarent GmbH, a web development company in Bonn, Germany. Westy has over fifteen years experience as a professional software developer, where he began his career by programming the Pythagorean theorem into an IBM 1620 with punched cards.
Read More Show Less

Read an Excerpt

Chapter 3: Java Servlets and JavaServer Pages: Jakarta Tomcat

This chapter introduces a great product from the Apache Software Foundation. Tomcat is the reference implementation of the Java Servlet 2.2 and JavaServer Pages 1.1 specifications.

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.

3.1 Apache Software Foundation

Most likely, you are familiar with the Apache Server. Arguably the most popular Web server in the world, it hardly needs an introduction. Along with Linux, the Apache Server has brought the efficacy and legitimacy of open-source software development to the attention of nearly everyone with an interest in computing. Hoping for similar success, some major corporate players, such as IBM and Sun, are releasing the products of their own development efforts in the open-source arena. A cast of thousands, using as a base the best code from such products, is forging some exciting and freely distributed application components.

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 http://www.apache.org.

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.

3.2 Jakarta Tomcat

The Jakarta Project Web site is the place to find the most current official information about Tomcat Server. You can familiarize yourself with that Web site at http://jakarta.apache.org .

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.

3.2.1 Reasons to Use Tomcat

Tomcat is a great choice for learning about Java servlets, JavaServer Pages, and Web applications. First, it is freely available. Second, what you learn will become more relevant as other servlet containers match Tomcat's reference implementation. Third, this is an extremely popular product—it is being downloaded from the Jakarta Web site at a rate that is fast approaching a million copies per year!

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.

3.2.2 Tomcat versus Apache Server

Is Tomcat a replacement for Apache Server? No—not yet, anyway. That is why Web applications that use Tomcat usually use Apache as well. Sometimes the decision to do that is obvious. One example is when an Apache Server is already being used and is configured to use other necessary software. But the best reason to use both servers is that Tomcat is not as fast as Apache Server is at serving static HTML pages. By itself, Apache Server cannot handle Java servlets and JSPs. Usually, when you use Tomcat, it will be to provide this service to Apache (or another Web server). Used as a JSP container, Tomcat usually needs access to a Java compiler to compile the JavaServer Pages. As a developer, that is usually not your concern; you can assume that the system hosting your Web application will make available either a licensed Sun SDK or the IBM Jikes compiler.

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.

3.2.3 Apache License for Tomcat

The Apache projects are released under the Apache license. An open source license, it basically allows any use of the software as long as several conditions are met. Mostly these deal with acknowledgement of the copyright, name protection, and legal protection.

The text of the Xerces and Xalan licenses is reproduced with the source code at the end of this book.

3.3 Installing Tomcat

The version of Tomcat that we are using now is 3.2.1. This release should be used instead of 3.2 because it fixed a security problem. (Earlier, the project for this book used version 3.1. If you need to use a 3.1 version for some reason, you can, but do use 3.1.1, which has the security update.) You should check the Jakarta Web site for even later releases; definitely use the latest stable version for your own projects. We cannot promise that our discussion—or the code as provided with this book—will still work with the next version of Tomcat (probably 4.0), though.When using that becomes possible, news and updates will be posted on the project Web site (//www.bonfo-rum.org).

You can get a Tomcat distribution from the CD-ROM provided with this book. Otherwise, download it from the Web.You can start at http://jakarta.apache.org/builds/tomcat/release/.

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 http://java.sun.com/products/servlet/2.3/javadoc/index.html and http://java.sun.com/products/jsp/javadoc1_1.zip.

3.3.1 Unzipping Tomcat Distribution Files

Unzip the distribution archives into the root folder of your drive. We will assume that you are using the C drive, which will put Tomcat into the folder c:\jakarta-tomcat.

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.

3.3.2 Tomcat User Guide

Tomcat has a user manual that is gradually improving over time. Look for it with the name c:\jakarta-tomcat\doc\uguide\tomcat_ug.html.

You can also browse the user guide on the Jakarta Web site along with some other helpful Tomcat documentation. Try http://jakarta.apache.org/tomcat/jakarta-tom- cat/src/doc/index.html.

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.

3.3.3 Using Tomcat with IIS

As a Windows NT user, you are most likely familiar with the Microsoft Internet Information Server (IIS) Web server, which is included with the NT 4.0 Option Pack.

For more information about IIS, you can visit the Microsoft Web site http://www.microsoft.com/ntserver/web/.

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 http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis- howto.html.

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 Apache\jakarta\tomcat\release\v3.2.1\bin\win32\i386.

3.3.4 Using Tomcat with Apache Server

The open-source Apache Server is available for NT and various UNIX systems. It is included with most Linux distributions.You can download this free HTTP server by following the links from the Apache Software Foundation Web site at http://www.apache.org.

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 http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-apache- howto.html.

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 Apache\jakarta\tomcat\release\v3.2.1\bin\win32\i386.

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....

Read More Show Less

Table of Contents

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
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)