Head First Servlets and JSP

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 have a 1.3 or greater J2SE SDK, you need it. (1.4 preferred.)
  • If you don't already have Tomcat 5, go get it from: http://jakarta.apache.org/site/bin/index.cgi Scroll down to the page to the Tomcat 5.0.xxx listing. Select the appropriate download (usually by machine type). 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 at:
    Servlet 2.4 (JSR #154) http://jcp.org/en/jsr/detail?id=154
    JSP 2.0 (JSR #152) http://jcp.org/en/jsr/detail?id=152
    JSTL 1.1 (JSR #52) http://jcp.org/en/jsr/detail?id=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/OSX). Point your browser to:
    http://localhost:8080/ and you'll see the Tomcat welcome page.

< Go back to Head First Servlets and JSP