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
Table of contents 1. Pull the image 2. Create a R...
Install MySQL and keep a note. I don’t know if it...
Nginx can use the limit_req_zone directive of the...
Preface After reading the previous article about ...
Recently, an error occurred while starting MySQL....
Firefox, Opera and other browsers do not support W...
title XML/HTML CodeCopy content to clipboard <...
Table of contents mapState mapGetters mapMutation...
Table of contents 1.setInterval() 2.setTimeout() ...
When we need to change the table name or modify t...
The content property was introduced as early as C...
1. Download the mysql-5.7.17-winx64.zip installat...
My system and software versions are as follows: S...
01. VMware Workstation Pro 15 Download Download: ...
In HTML pages, visual elements such as buttons an...