Original two Mao five brother 2017-03-19 23:54
Hot deployment is the modification of a JSP or Java class when you modify a project bug without restarting the Web server to make the changes effective (except for changes to the configuration file).
If you are using the latest version of MyEclipse or the IntelliJ idea Editor, there is no hot-deployment problem, and powerful mind has been configured for you. If you don't configure, look at the image below.
The configuration of Idea
Then we're talking about your company's eclips or other editors, so look at the bottom.
1, directly put the Project Web folder in the WebApps.
2, in the Tomcat\conf\server.xml
<context debug= "0" docbase= "D:\demo1\web" path= "/demo1" privileged= "true" reloadable= "true"/>
Reloadable= "true" to False (reloadable= "false")
3, the third Way and the second kind of similar, but not in the Server.xml file to add a context tag, but in the
Add an XML file to the%tomcat_home%\conf\catalina\localhost
such as: Demo1.xml, the contents are as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<context docbase= "D:\demo1\web" reloadable= "true"/>
, just missing the path attribute, and if you're writing a path= "Demo2", it's no use, and Tomcat doesn't explicitly tell you: "I don't Know",
This way the server uses the name of the XML file as the name of the path attribute, so the access address is: Http://localhost:8080/demo1
I often use the second type. I use ecleps when most of the development, accounting for less memory, running fast, mainly the interface is simple, with the habit. The first thing you can do when you finish a new project is Server.xml reloadable= "true" to false.
If you want to be more simple, you can also configure the Eclipse plug-in: Jrebel, the configuration is very simple, I search it, I do not wordy.