Knowledge required for Apache tomcat8

Source: Internet
Author: User
Tags apache tomcat
Knowledge required for Apache tomcat8

Author: chszs, reprinted with note. Blog homepage: http://blog.csdn.net/chszs

I. Introduction to Apache Tomcat 8

Apache Tomcat 8rc1 was released a few days ago. It has been developed for two years and has introduced many new features. It is not recommended for use in products because it is only an alpha version. However, we should know what new features it has to use in our development projects after the stable version is released.

Apache Tomcat 8 supports Java ee 7 specifications, including Java Servlet 3.1, JSP 2.3, and Java Unified Expression Language El 3.0.

Let's take a look at the javaee specifications supported by tomcat in recent versions.
------------------------
Tomcat 6: servlet 2.5, JSP 2.1, El 2.1
Tomcat7: servlet 3.0, JSP 2.2, El 2.2
Tomcat8: servlet 3.1, JSP 2.3, and El 3.0
------------------------

In addition, Tomcat 8 also supports new specifications such as Java websocket 1.0.

II. Introduction to servlet 3.1

The biggest improvement of servlet 3.1 is non-blocking I/O communication. This greatly improves the performance. data can be managed asynchronously through the readlistener and writelistener interfaces.
The second major improvement of servlet 3.1 is the upgrade of HTTP protocol. It allows the client to specify the protocol used for communication between the two parties. For example, the server and client can be upgraded to websockets communication by using the HTTP communication protocol.

Iii. Introduction to JSP 2.3

Compared with Version 2.3, JSP 2.2 does not add any new functions or features, mainly for maintenance and cleaning.

Iv. Introduction to El 3.0

El 3.0 is greatly improved and enhanced compared with earlier versions. Mainly include:
1) El can run in "standalone mode", that is, it runs outside of servlets and JSP pages.
In short, this enhancement can be called directly within or outside the servlet container using the elprocessor class.
2) El expressions also support lambda expressions, which are similar to Java 8 and can simplify code.
Expressions include: parameter set, Lambda operator, and function body.
3) The set operator allows the construction of set, list, map, and other set types.
4) Java El stream APIs include filters such as foreach, reduce, filter, and map.
Here we can get the set or list, call the string couple, or run an external filter or aggregate function in the list. For example, you can sum a string.
5) through El context import, developers can directly access static fields and methods of any class.

V. Introduction to websocket 1.0

Tomcat 8 officially supports the standard API websocket 1.0. Although Tomcat 7 also provides support, it is only partially supported, because in the Tomcat 7 era, standards have not yet been formally formulated. At present, most websites still run HTTP Communication in half duplex mode, which means that communication may occur at both ends, but at the same time point, there can only be one direction of communication. This is a bit like a walkie talkie.
The websockets protocol is a full-duplex protocol, which means that at the same time point, communication is bidirectional data transmission. Websockets is also one of the HTML5 specifications.

6. Improvements within Tomcat 8

Resource is the biggest change in Tomcat 8. Tomcat 8 Resources are restructured to better support external resources. The original aliases, virtualloader, virtualdircontext, Jar resources, and external repositories are all configured in a single and consistent way. The implementation of this new resource can also be used for the main war package and serves as the basis for multiple other web applications.

In addition, there is support for the spdy protocol, and there is still some controversy here, because spdy is not perfect yet.

Finally, Tomcat 8 has some security enhancements, mainly because SSL encryption provides additional diagnostic information.

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.