IDEA deployment Tomcat 8
1. Download Tomcat
- Log in to the tomcat official website http://tomcat.apache.org/ , there is a download option in the left column, select to download the corresponding Tomcat version.
There are two formats of zip and exe in the download version, zip is the installation-free version, and exe is the installation version. Pay attention to choose the corresponding installation version according to your computer system (64-bit or 32-bit).
Considering various reasons, I chose to download the zip version.
Unzip directly after downloading.
2. Find bin under the directory after decompressionstartup.bat
, and click to start Tomcat. Shut down Tomcat (shutdown.bat
).
Two, Tomcat configuration environment variables
1. After the installation is complete, right-click "My Computer", click "Properties", "Advanced System Settings", and "Environment Variables".
2. Add two variables in the system variablesCATALINA_BASE
: and CATALINA_HOME
. As shown in FIG.
3. Add in the variable value of ClassPath%CATALINA_HOME%\lib\servlet-api.jar;
: (Note that the semicolon is the semicolon under the English input method).
Mine is a newly created CLASSPATH variable. After Baidu, I found that Java can have no CLASSPATH, just pay attention to adding it to Path. However, if Tomcat is configured, CLASSPATH and PATH must be modified accordingly.
4. Add it to the Path variable %CATALINA_HOME%\bin;``%CATALINA_HOME%\lib;
(note that the semicolon is in the state of the English input method).
5. Verification: Open cmd
the terminal and enter the command startup
, as shown in the figure, that means the configuration is successful.
3. IDEA configures Tomcat
1. Click Run — Edit Configurations
2. Click the "+" sign on the left, find Tomcat Server, and select Local (if there is no Tomcat Server in the directory, you can find it in the bottom 34 items more).
3. Click Configuration , find the Tomcat installation folder, and click OK .
After performing the above steps, Tomcat configuration is complete.
Reference link: https://www.cnblogs.com/weixinyu98/p/9822048.html