Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure Tomcat

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to install and configure Tomcat". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

one。 What is Tomcat?

Tomcat is the smallest WEB container that conforms to the JavaEE WEB standard. All JSP programs must be supported by the WEB container to run, and transaction operations are supported in a given WEB container. Tomcat is an installable and unzipped version provided by Apache. The installation version can appear a Tomcat service in the service. No installation is required, and the installation-free version is used in development. Tomcat is simply a network server running Java. The bottom layer is a program of Socket, which is also a container of JSP and Servlet. Tomcat is a core project of the Jakarta project of the Apache Software Foundation (Apache Software Foundation), which is jointly developed by Apache, Sun and other companies and individuals. With the participation and support of Sun, the latest Servlet and JSP specifications are always reflected in Tomcat. Because of its advanced technology, stable performance and free, Tomcat is deeply loved by Java enthusiasts and recognized by some software developers, and has become a popular Web application server.

Tomcat server is a free and open source Web application server, which is a lightweight application server. It is widely used in small and medium-sized systems and not many concurrent access users. It is the first choice for developing and debugging JSP programs. For a beginner, it can be thought that when an Apache server is configured on a machine, it can be used to respond to requests for access to HTML (an application under the standard general markup language) pages. The Tomcat part is actually an extension of the Apache server, but it runs independently, so when you run tomcat, it actually runs as a separate process from Apache. When configured correctly, Apache serves the HTML page, while Tomcat is actually running the JSP page and Servlet. In addition, Tomcat, like Web servers such as IIS, has the ability to process HTML pages. In addition, it is also a Servlet and JSP container, and a separate Servlet container is the default mode of Tomcat. However, Tomcat is not as capable of handling static HTML as Apache servers. Currently, the latest version of Tomcat is 9.0.

two。 Install Tomcat

Running Tomcat requires the support of JDK [Tomcat will find the required JDK through JAVA_HOME]. Installation is the unzipping process. Start Tomcat. If you can access it, it will be installed.

2. View index.html or index.jsp files in the ROOT directory

There is a page in Tomcat8, but not in tomcat7 without installation. If you directly access 404 Tomcat7.XXX, you need to check whether there is index.html or index.jsp in the webapps- > ROOT directory. If not, you can manually add a html file or copy a copy of jsp elsewhere. If you can access this page, the configuration is successful. 3. Start Tomcat (use the command line to start tomcat in the bin directory under the installation directory of tomcat)

The startup window cannot be closed after startup

4. Open a browser and enter http://localhost:8080/ to access

OK Tomcat installed successfully.

5. Call the shutdown command to shut down Tomcat

three。 Tomcat directory structure

1.bin: start and close the bat file for tomcat

2. Conf: configuration file server.xml this file is used to configure server-related information, such as tomcat startup port number, configuration host (Host) web.xml file configuration and web application (web application is equivalent to a web site) tomcat-user.xml configuration user name, password and related permissions.

3. Lib: this directory places the jar packages needed to run tomcat

4. Logs: store logs. When we need to view logs, we can query information.

5. Webapps: place our web application

6. Work working directory: this directory is used to store the corresponding server files and .class files generated after jsp is accessed.

This is the end of "how to install and configure Tomcat". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report