Getting started with the Servlets Engine

Source: Internet
Author: User

What is Servlets?

Servlets is a Java technology that focuses on CGI development. Run on the Server and generate dynamic results. Why should we use Servlets instead of traditional CGI programs?

Efficiency: When a traditional CGI program receives an HTTP request, the system starts a new process to process the request, which will reduce the system performance. With Servlets, Java VMs has been running. After receiving a request, Java VMs creates a Java thread to process it immediately, this is much more efficient than starting a new system process every time.

Powerful functions: Servlets allows you to use many powerful functions that traditional CGI cannot provide. You can use Java APIs to accomplish anything that traditional CGI deems difficult or impossible. Servlets can easily implement data sharing and information maintenance, and track sessions and other functions.

Security: Servlets runs within the limits of the Servlets engine, just like running Applets in a Web browser. This helps protect Servlets from threats.

Cost: Because Servlets can run on multiple Web servers, you can use a free or inexpensive server and enable it to support Servlets, which can greatly reduce costs.

Flexibility: Because Servlets runs on the Java platform, because of Java's cross-platform nature, Servlets can easily be transferred from one platform to another, greatly improving flexibility.

A Servlets is actually a Java class. It needs to run on a Java Virtual Machine and use the Servlets engine. When a Servlets is requested, the Servlets engine calls this Servlets and runs until the called Servlets is completed or the Servlets engine is disabled.

JavaServlets development tool JSDK) can be downloaded from Sun's website. It includes Servlets APIs and a simple Servlets engine.

  1. Servlet Container session tracking
  2. Detailed description of Servlet instances
  3. Introduction to Servlet read request headers
  4. Call the Http Servlet Request Method
  5. Basic Structure of Servlet

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.