How do beginners understand tomcat server ?, Tomcat server for beginners

Source: Internet
Author: User

How do beginners understand tomcat server ?, Tomcat server for beginners

Tomcat introduction:
Tomcat serverIs a free open source codeWeb Application Server.
When the configuration is correct, Apache serves the HTML page, while Tomcat actually runsJSP page and Servlet. In addition, Tomcat, like Web servers such as IIS and Apache, has the ability to process HTML pages. In addition, it is alsoServlet and JSP containersThe independent Servlet container is the default mode of Tomcat. However, Tomcat cannot process static HTML as well as Apache servers.
Container Overview:
Different from traditional desktop applications, the application in Tomcat isWAR(Web Archive) file. WAR is a Web application format proposed by Sun. Similar to JAR, WAR is also a compressed package of many files.
The files in this package areDirectory structureUsually its root directory contains Html and Jsp files or directories containing these two files, there is also a WEB-INF directory, this directory is very important. Usually there is a web under the WEB-INF directory. xml file and a classes directory, web. xml is the configuration file of this application, while the classes directory contains the compiled Servlet class and other classes (such as JavaBean) on which Jsp or Servlet depends ). Usually these dependent classes can also be packaged into JAR to the lib directory under the WEB-INF, of course, can also be placed in the system CLASSPATH, but that porting and management is not convenient.
Tomcat and Web Server
Tomcat is a container that supports Servlet and JSP running.. Servlet and JSP can generate dynamic web content based on real-time needs. For Web servers, Apache only supports static Web pages, but does not support dynamic Web pages. Tomcat can serve dynamic Web pages and support static Web pages. Although it does not have a common Web server that is fast and features less abundant than the Web server, Tomcat gradually supports constant expansion of static content. Most Web servers use underlying languages such as C and take advantage of the features of the corresponding platform. Therefore, the Tomcat execution speed written in pure Java cannot be compared with those of them.
Generally, a large site combines Tomcat with Apache. Apache is responsible for accepting all HTTP requests from the client, and then forwards Servlets and JSP requests to Tomcat for processing. After Tomcat completes processing, it returns the response to Apache, and finally Apache returns the response to the client.

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.