Java Servlet and JSP Tutorials (2)

Source: Internet
Author: User
Tags add include reference small web server version java web tomcat apache tomcat
js|servlet| Tutorial

2 installation

 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 http://java.sun.com/products/servlet/.

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 has a detailed description of this, but Lord?? is to add Servlet.jar and Jsp.jar to the 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 http://java.sun.com/products/servlet/industry.html 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, is it more obvious to configure Tomcat? creak you ar http://jakarta.apache.org/.

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? creak you argon Wei?http://java.sun.com/products/servlet/download.html??br>;
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's website or starnine Web STAR. The limit version that supports up to 5 concurrent connections is free, does not exist in the commercial version, and adds functionality such as the remote management console? creak near Argon Wei http://www.allaire.com/products/jrun/.

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. creak you ar http://newatlanta.com/.

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? creak you argon Wei? http:// www.gefionsoftware.com/.

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 http://www.sun.com/software/jwebserver/try/.



Related Article

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.