1 Download and start Tomcat Go to the official website http://tomcat.apache.org/ and download the latest version of Tomcat 9 Download according to your computer version, I am using Windows 64-bit After downloading, just unzip it. After double-clicking startup.bat to start tomcat, open http://localhost:8080. If you enter the following interface, it means that the startup is successful. 2 Configure environment variables for Tomcat 9 in win10 Right-click "My Computer", click "Properties", select "Advanced System Variables" Select the Advanced tab -> Environment Variables In "System Variables", add system variables and add the following: Create a new variable name: CATALINA_HOME Click OK. Finally, verify whether the configuration is successful. 3 Create the first JavaWeb project in IDEA Click File -> New -> Project… Select Java -> Web Application, then click Next. Give a project name, here we take JavaWebTest as an example, and then click Finish. The project directory structure is as follows: Modify the code in index.jsp to facilitate testing later. The code is as follows: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> Hello world! </body> </html> 4 Configure Tomcat and run the project on IntelliJ IDEA 2018 Open IDEA and click Run-Edit Configurations… Click the "+" sign, then find Tomcat Server and select Local Under the Tomcat Server -> Unnamed -> Server -> Application server project, click Configuration, find the local Tomcat server (that is, the decompression path above), and then click the OK button. You can change Unnamed to another name, such as Tomcat 9 Then go to the Deployment tab next to it, click the "+" sign, select Artifact, select the project name As shown in the figure below, you can also modify the name of the Application context path to make it simpler, and then click OK. After configuration, you can see the following picture on the project interface and click Run. Operation Results Summarize This is the end of this article about configuring Tomcat on IntelliJ IDEA 2018 and running the first JavaWeb project. For more information about configuring Tomcat on IntelliJ IDEA 2018 and running the first JavaWeb project, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: Detailed steps for configuring mysql8.0.20 with binlog2sql and simple backup and recovery
Preface Use nginx for load balancing. As the fron...
Preface I recently encountered this requirement a...
01 The concept of parallel replication In the mas...
1. Install MySQL database on mac 1. Download MySQ...
1. Two ways to define react components 1. Functio...
Table of contents Preface 1. Nginx+Tomcat 2. Conf...
Table of contents Problem Overview Problem Reprod...
When the software package does not exist, it may ...
1. Introduction By enabling the slow query log, M...
In one sentence: Data hijacking (Object.definePro...
Front-end technology layer (The picture is a bit e...
This status code provides information about the s...
Preface: rm under Linux system is irreversible. T...
Table of contents 1. Component Communication 1. P...
Flash file formats: .FLV and .SWF There are two ex...