eWebProgrammer eweb





Servlet Configuration  «Prev  Next»
Lesson 1

Software setup and configuration for the Java Web Server

Before you can write a servlet, you need to install some support software. This includes the Java Servlet Development Kit, which will provide you with the classes your servlet will extend, and the Java Web Server, which you can use to test your servlets.
You will also learn about some other avenues that you can follow to add servlet support to your Web site.
After completing this module, you will be able to:
  1. Get and install the JSDK
  2. Get, install, and configure the Java Web Server
  3. List some other Web servers that support servlets
  4. List some add-ons that add servlet capability to popular Web servers
  5. Run a sample servlet with the JSDK server


Support for Servlets

Like Java itself, servlets were designed for portability and are supported on all platforms that support Java. Servlets work with all the major web servers like
  1. Glassfish
  2. JBoss Enterprise Application Platform
  3. Apache Tomcat
  4. Apache TomEE
  5. Apache Geronimo
  6. Jetty
  7. JOnAS
  8. Resin Servlet Container (Open Source)
Java servlets, as defined by the Java Software division of Sun Microsystems (formerly known as JavaSoft), are the first standard extension to Java. This means that servlets are officially blessed by Oracle and are part of the Java language, but they are not part of the core Java API. Therefore, although they may work with any Java Virtual Machine (JVM), servlet classes need not be bundled with all JVMs.
To make it easy for you to develop servlets, Oracle has made publicly available a set of classes that provide basic servlet support. The
  1. javax.servlet and
  2. javax.servlet.http
packages constitute this Servlet API. Version 2.0 of these classes comes bundled with the Java Servlet Development Kit (JSDK) for use with the Java Development Kit version 1.5 and above.
Many web server vendors have incorporated these classes into their servers to provide servlet support, and several have also provided additional functionality.