Lesson 2 | Java Servlet Development Kit |
Objective | Describe how to download and install the JSDK. |
Java Servlet Development Kit
The JSDK is the Java Servlet Development Kit. It is a set of classes that complement the class library in the JDK, and some utilities
and has been archived by Oracle corporation.
Legacy Web Server Technology
Although the JSDK is still available as a legacy technology from the Oracle archives, here
Download JSDK 2.1, I would advise against using the JSDK and instead use Apache Tomcat versions 7 or later, either on your local machine or on a cloud server.
You will continue to use the Jave Development kit to compile your Java code, and you will use the Tomcat Server to run your servlet applications,
since the classes for the "Java Servlet Development Kit" have been archived by Oracle.
For the purpose of running and testing Java Servlets, I would use Tomcat 8 or Tomcat 9.
To check which version of Tomcat that you have running on your linux server, execute the following command
cd tomcat/lib
java -cp catalina.jar org.apache.catalina.util.ServerInfo
Java Servlet Classes
It does not matter where you get the servlet classes, as long as you have them on your system, since you need them to compile your servlets. In addition to the servlet classes, you need a servlet engine,
so that you can test and deploy your servlets. Your choice of servlet engine depends in part on the web servers you are running. There are three flavors of servlet engines: standalone, add-on, and embeddable.
Standalone Servlet Engines
A standalone engine is a server that includes built-in support for servlets and such an engine has the advantage that everything works right out of the box. One disadvantage, however, is that you have to wait for a new release of the web server to get the latest servlet support. As the various vendors upgrade their web servers, we expect that many of the servers will provide built-in support for servlets. Furthermore, the majority of application servers are dedicated Java servers as in the case of Tomcat.
Instructions for Installing the (JSDK) Java Servlet Development Kit (Archived and Deprecated) [Tomcat recommended]
Follow the instructions on the Sun site to download the software to your computer. The following are the basic steps:
- From the Product page go to the Java Servlets page
- Scroll down to the JSDK download area. Choose your platform and click Download.
- Accept the license agreement by clicking Accept (read it first).
- Click one of the download buttons, according to your geographical location.
- When your browser asks, choose to save the file to disk. Choose whatever folder you wish on your system.
- Run the file you downloaded and install the files it contains into a sensibly named folder on your system.
For example, on my Windows system I expanded them into C:\JSDK2.1.
The kit, when expanded, contains the source code for the servlet classes, a simple Web server to use as a test environment for servlets,
full documentation and examples, and assorted utilities.
In the next lesson learn we will discuss how to get the JSDK working.