Training courses from the book’s author:
• Personally developed and taught by Marty Hall
• Available onsite at your organization (any country)
• Topics and pace can be customized for your developers
• Also available periodically at public venues
• Topics include Java programming, beginning/intermediate servlets
and JSP, advanced servlets and JSP, Struts, JSF/MyFaces, Ajax,
GWT, Ruby/Rails and more. Ask for custom courses!
Before you can start learning specific servlet and JSP techniques, you need to have
the right software and know how to use it. This introductory chapter explains how to
obtain, configure, test, and use free versions of all the software needed to run servlets
and JavaServer Pages (JSP). The initial setup involves seven steps, as outlined below.
1. Download and install the Java Software Development Kit
(SDK). This step involves downloading an implementation of the Java
2 Platform, Standard Edition and setting your PATH appropriately. It
is covered in Section 2.1.
2. Download a server. This step involves obtaining a server that imple-
ments the Servlet 2.3 (JSP 1.2) or Servlet 2.4 (JSP 2.0) APIs. It is cov-
ered in Section 2.2.
3. Configure the server. This step involves telling the server where the
SDK is installed, changing the port to 80, and possibly making several
server-specific customizations. The general approach is outlined in
Section 2.3, with Sections 2.4–2.6 providing specific details for Apache
Tomcat, Macromedia JRun, and Caucho Resin.
4. Set up your development environment. This step involves setting
your CLASSPATH to include your top-level development directory and
the JAR file containing the servlet and JSP classes. It is covered in
5. Test your setup. This step involves checking the server home page
and trying some simple JSP pages and servlets. It is covered in Section
Please see updated setup information at