If you are using Tomcat :
1. You should already have included the servlet JAR to your project classpath
2. Download the API sources at Tomcat's homepage (Tomcat 6.x)
3. Right-click your servlet JAR, click Properties. In the Java Source Attachment page, select the source archive you downloaded in 2.
You're done. If you're not using Tomcat, you'll have to download the sources of your container, if they are available.