Java Reference
In-Depth Information
Servlets can be created using the javax.servlet and javax.servlet.http packages,
which are a standard part of the Java's enterprise edition, an expanded version of the Java
class library that supports large-scale development projects.
These classes implement the Java Servlet and JSP specifications. At this time, the current
versions are Java Servlet 2.5 and JSP 2.1.
For users of the standard Java edition, which has been covered throughout this topic, the
servlet packages can be downloaded from Sun's Java servlet site at
http://java.sun.com/products/servlet. Click the Downloads link and under the
Specifications heading, choose the Download Class Files link for the Java Servlet specifi-
cation version 2.3 (class files for newer versions also might be available).
After installing the class files, to make them available, add the root folder of the installa-
tion to your computer's Classpath environmental variable (for example, if the javax
folder was saved in c:\java\servlet-2.3 , add the c:\java\servlet-2.3 folder to the
Classpath ).
Another way to get these files is to use the Java servlet class library that ships with the
server you'll be using to deploy these applications.
Running servlets and JSP requires a server that supports the technologies.
Servlets are supported by several web servers, each of which has its own installation,
security, and administration procedures.
The most popular choice for new servlet developers is Tomcat, an open source server
developed by the Apache Software Foundation in cooperation with Sun Microsystems.
Version 5.5 of Tomcat supports Java Servlet 2.4 and JSP 2.0.
Tomcat can run in conjunction with another web server (such as Apache's web server) or
as a standalone server. Your current web server or web application server might already
include support for servlets.
The software is available as a free download from Apache's website at the address
http://jakarta.apache.org/tomcat. Several versions are available: Download version 5.5.
Full installation instructions for Tomcat are available from the website. If you want to
run it as a standalone server for testing purposes, in most cases, the following procedure
works:
21
1. View the downloads page for Tomcat and other Apache projects: Visit
http://jakarta.apache.org/tomcat, and in the Downloads section of the site menu,
click the Binaries link.
A page opens with links to Apache software you can download, which are called
builds .
Search WWH ::




Custom Search