Second, the establishment of development, operating environment

Source: Internet
Author: User
Tags add include reference small web server version java web tomcat apache tomcat
2.1 Installing the servlet and JSP development tools

To learn about servlet and JSP development, you must first prepare a development environment that conforms to the Java Servlet 2.1/2.2 and JavaServer pages1.0/1.1 specifications. Sun offers free JavaServer Web Development Kit (JSWDK), which can be downloaded from

After installing the JSWDK, you will also tell Javac where to find the servlet and JSP classes when compiling the files. The JSWDK Installation Guide describes this in detail, but the main thing is to add Servlet.jar and Jsp.jar to Classpath. Classpath is an environment variable that instructs Java how to look for class files, if you do not set Classpath,java to look for classes in the current directory and standard system libraries, and if you set the classpath yourself, don't forget to include the current directory (that is, include in the Classpath " .” )。

In addition, to avoid naming conflicts with other developers installing to the servlet on the same Web server, it is best to put your servlet in the package. At this point, adding classpath to the top-level directory in the package hierarchy can be quite handy. Please refer to the details below.

   2.2 Installing a Web server that supports servlet

In addition to the development tools, you will install a Web server that supports the Java servlet, or install a servlet package on an existing Web server. If you are using the latest Web server or application server, it is likely that it already has all the necessary software. Check your Web server's documentation or visit to view a list of server software that supports the servlet.

While it is often the business-Class server that ultimately runs the servlet, it's enough to start learning with a free system that can run on a desktop. Here are some of the most popular products today.

Apache Tomcat.

Tomcat is an official reference implementation of the servlet 2.2 and JSP 1.1 specifications. Tomcat can be used as either a small servlet, a JSP test server, or an Apache Web server. Until the early 2000, Tomcat was the only server that supported the servlet 2.2 and JSP 1.1 specifications, but many other servers have announced support for this.

Tomcat is free as well as Apache. However, fast, stable Apache server installation and configuration is a bit cumbersome, Tomcat has the same disadvantage. Compared to other business-level servlet engines, it is obvious that the workload of configuring Tomcat is a little more. Please see details.

JavaServer Web Development Kit (JSWDK).

JSWDK is an official reference implementation of Servlet 2.1 and JSP 1.0. Before you deploy servlet and JSP applications to the server where they are officially running, JSWDK can be used as a small servlet, JSP test server alone. JSWDK is also free, and has a good stability, but its installation and configuration is also more complex. Please see for details.

Allaire JRun.

JRun is a servlet and JSP engine that can be integrated into Netscape Enterprise or FastTrack Server, IIS, Microsoft Personal Web Server, lower-version Apache, O ' eilly website or starnine Web STAR. A limited version of up to 5 concurrent connections is free, this restriction is not present in the commercial version, and features such as remote management consoles are added. Please see details.

the servletexec of New Atlanta

Servletexec is a fast servlet and JSP engine that can be integrated into most popular web servers, including Solaris, Windows, MacOS, HP-UX, and Linux. Servletexec can be downloaded and used for free, but many advanced features and management tools are available only after you have purchased a license. The New Atlanta also provides a free servlet debugger that works under many popular Java Ides. Please see details.

Gefion's Litewebserver (LWS)

LWS is a free small Web server that supports Servlet 2.2 and JSP 1.1. Gefion also has a free Waicoolrunner plugin that can be used to add servlet 2.2 and JSP 1.1 support for Netscape FastTrack and Enterprise Server. Please see details.

Sun's Java Web Server.

This server is all written in Java and is one of the first Web servers to provide full support for the servlet 2.1 and JSP 1.0 specifications. Although Sun has now turned to Netscape/i-planet server and is no longer developing Java Web Server, it is still a popular servlet, JSP learning platform. To get a free trial version, visit

Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.