Head First Servlets and JSP, 2nd Edition

Book code and downloads

Read Me: What you need for this book

Besides your brain and a pencil, you need Java, Tomcat 5, and a computer.

You do not need any other development tool, such as an Integrated Development Environment (IDE). We strongly recommend that you not use anything but a basic editor until you complete this book. A servlet/JSP-aware IDE can protect you from some of the details that really matter (and that you'll be tested on), so you're much better off developing the bean code completely by hand. Once you really understand what's happening, you can move to a tool that automates some of the servlet/JSP creation and deployment steps. If you already know how to use Ant, then after chapter 3, you can switch to using it to help you deploy, but we don't recommend using Ant until after you've completely memorized the web app deployment structure.

Getting Tomcat

  • If you don't already Java SE v1.5 or greater, you'll need it.
  • If you don't already have Tomcat 5, go get it.
    Select "Tomcat v5.5" in the Downloads menu on the left side of the home page.
  • Scroll down to the "Binary Distributions" section and download the version of your choice. If you do not know, then select the "Core" distribution; it is all you need.
  • Save the installation file in a temporary directory.
  • Install Tomcat.
    For Windows, that means double-clicking the install .exe file and following the installer wizard instructions. For the others, unpack the install file into the place on your hard drive where you want Tomcat to be.
  • To make it easier to follow the book instructions, name the Tomcat home directory "tomcat" (or set up a "tomcat" alias to the real Tomcat home).
  • Set environment variables for JAVA_HOME and TOMCAT_HOME, in whatever way you normally set them for your system.
  • You should have a copy of the specs, although you do not need them in order to pass the exam. At the time of this writing, the specs are here:
    Servlet 2.4 (JSR #154)
    JSP 2.0 (JSR #152)
    JSTL 1.1 (JSR #52)
    Go to the JSR page and click on the Download Page for the final release.
  • Test Tomcat by launching the tomcat/bin/startup script (which is startup.sh) for Linux/Unix/OS X. Point your browser to: http://localhost:8080/ and you'll see the Tomcat welcome page.

< Go back to Head First Servlets and JSP, 2nd Edition