About servlet

xiaoxiao2021-03-06  51

Servlet is a server-side component written in Java, protocols, and platforms that use the Request / Response mode, providing a Java-based web server solution that dynamically expands the Java web server. Since the servlet is running inside the server, the graphical user interface is not required.

Although all servlets are written in Java, their clients can be written in other languages ​​when servlet is used as the intermediate layer of the distributed application, they can alternately become Client or server. For example, servlets can connect to an application that accepts a relational database using JDBC.

The dynamic text generated using servlet is easier than the CGI script, and the operating efficiency is higher, which is an efficient alternative to the CGI script.

The biggest advantage of the Servlet API is the independence of the protocol. It does not assume the protocol used by the network, how servlet is loaded, and these features allow the Servlet API to easily embed many different types of servers, in addition, it It also has a feature of scalable, simple, short, easy to use.

First, the use of servlet

A simple servlet can handle the use of HTML Form to use POST to transfer data on HTTP / HTTPS, such as a order with credit card data. Complex servlets (possibly using RMI technology) can be used to implement order input and processing systems, production and inventory databases or a complex online payment system.

Since the servlet can process multiple requests with a plurality of requests, requests can be synchronized with each other, so it supports collaborative applications, such as online meetings.

Define a community of an active subject, sharing between each other, can be passed as a servlet as a servlet to another server, which can be used to balance the same image content in multiple servers. Or, you can use a logical service to several servers, implement load balancing, and implement load balancing by a boundary routing request of the task type or organization.

Second, the effectiveness of the API

Java Servlet API is a standard is a Java extended API, in J2SDKee, has developed into a part of the Java core framework.

JavaSoft provides a package that can be used to embed servlets in other servers, such as Apache, Netscape servers, and Microsoft IIS servers.

转载请注明原文地址:https://www.9cbs.com/read-91194.html

New Post(0)