|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
The remaining lessons in this trail show you how to write HTTP servlets. Some knowledge of the HTTP protocol is assumed; to learn more about the HTTP protocol, you could look at the RFC for HTTP/1.1
.
The lessons use an example called Duke's Bookstore, a simple on-line bookstore that allows a customer to perform various functions. Each function is provided by a servlet:
Function Tomcat Servlet JSDK2.1 Servlet Browse the books offered for sale CatalogServletCatalogServletBuy a book by placing it in a "shopping cart" CatalogServletCatalogServletGet more information on a specific book BookDetailServletBookDetailServletSee the books that have been selected for purchase ShowCartServletShowCartServletRemove one or more books from the shopping cart ShowCartServletShowCartServletBuy the books in the shopping cart CashierServletCashierServletReceive a Thank-You for the purchase ReceiptServletReceiptServletThe lessons use the servlets to illustrate various tasks. For example, the BookDetailServlet is used to show you how to handle HTTP GET requests and the CatalogServlet is used to show you session tracking.
Several source files comprise the Duke's Bookstore example. For your convenience, we include two downloadable zip archives: one contains all of the source files necessary to build and run the example using Tomcat, the other contains all of the source file necessary to build and run the example using JSDK2.1.
Download the zip archive for Tomcat
Download the zip archive for JSDK2.1
To run the example, first start a process that runs servlets, such as Tomcat or the JSDK2.1 server. Once the process is running, call the servlet from a browser.
|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved.