Head First Servlets & JSP, First Edition

Head First Servlets & JSP

This page is for the first edition of Head First Servlets & JSP. For the most recent edition, see this page.

See this page for a note from the editor regarding our decision to do a second edition of this book.

This book will get you way up to speed on the technology you'll know it so well, in fact, that you can pass the Sun Certified Web Component Developer (SCWCD) 1.4 exam. If that's what you want to do, that is. Maybe you don't care about the exam, but need to use Servlets & JSPs in your next project. You're working on a deadline. You're over the legal limit for caffeine. You can't waste your time with a book that makes sense only AFTER you're an expert (or worse one that puts you to sleep).

No problem. Head First Servlets and JSP's brain-friendly approach drives the knowledge straight into your head (without sharp instruments). You'll interact with servlets and JSPs in ways that help you learn quickly and deeply. It may not be The Da Vinci Code, but quickly see why so many reviewers call it "a page turner". Most importantly, this book will help you use what you learn. It won't get you through the exam only to have you forget everything the next day.

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.
Order
(opens a new window)

Read it on Safari


(opens a new window)

Buy 2 books, get 1 free!

Buy 2 books and get the third free! Use the coupon code OPC10 when you check out.

Also by Kathy Sierra & Bert Bates

Head First Java

Head First Java

Head First Design Patterns

Head First Design Patterns