1, Open the project and find the name of the entire project pom.xml, Note that this is not a subdirectory pom.xml
2, Open the general pom.xml, Find the corresponding name
3, Delete the target folder
4,build, Recompile
5, open idea Far right Maven Project, Find Nongda Wuwei
6, Double click first clean, after package, And check the console to see if the corresponding .war File ending with
7, Find the corresponding directory
8, copy .war File to tomcat In webapps Next ROOT in , And unzip it .war file , After decompression, it is as follows , If it's the old one , Delete
9, open bin catalog ,
10, double-click startup.bat, When the following appears, the table name almost succeeds
11, Open page input :localhost:8080 enter , Successfully opened
12, The test was successful , double-click shutdown.bat, close tomcat
****** tomcat Folder explanation ******
tomcat Folders and files in
************************************
1,bin The directory is mainly used for storage tomcat Your orders , There are two main categories , One is based on .sh Closing (linux command ), The other is based on .bat Closing (windows command ).
important :
Many environment variables are set here , For example, you can set JDK route ,TOMCAT route
startup Used to start tomcat
shutdown Used to close tomcat
modify catalina Can be set tomcat Memory for
2,conf The directory is mainly used for storage tomcat Some configuration files of .
important :
server.xml You can set the port number , Set up a domain name or IP, Default loaded project , Request encoding
web.xml Can be set tomcat Supported file types
context.xml It can be used to configure data sources and so on
tomcat-users.xml Used for configuration management tomcat Users and permissions of
stay Catalina The default loaded project can be set under the directory
3,lib The directory is mainly used for storage tomcat Run the jar package .
for example , Like connecting to a database jdbc We can add to the package lib From the catalog .
4,logs The directory is used for storage tomcat Log files generated during operation , Very important is the log output in the console .( It won't be right tomcat Impact on operation )
5,temp Directory User storage tomcat Temporary files generated during operation .( It won't be right tomcat Impact on operation )
6,webapps The directory is used to store applications , When tomcat It will be loaded at startup webapps Application under directory . You can use a folder ,war package ,jar Publishing applications in the form of packages .
of course , You can also place the application anywhere on the disk , Just map it in the configuration file .
7,work The directory is used for storage tomcat Compiled files at run time , for example JSP Compiled file .
empty work catalog , Then restart tomcat, It can clear the cache .
Technology