The following is a summary after reading the tomcat document. Hope to help.
--- Use the tomcat management function to manually load ----
The following describes how to manually load and start an application.
Feature: if an application is only published in this way, it is not permanently published to the server. That is, this load is only valid for the server in the current status, the application cannot be accessed after the server is started next time (unless it is loaded again ).
Note: These management functions apply to all tomcat applications (including applications automatically loaded as follows)
1) rewrite/conf/tomcat-user.xml, add Administrator Account
<User = "xxxx" password = "yyyy" roles = "standard, manager">
2) log on to the Administrator page
List applications:
Http: // localhost: 8080/manager/list
Install the application: (manual installation, can be installed at any time)
Http: // localhost: 8080/manager/install? Path =/hello & war = file: "g:/myjava/hello"
Start the application:
Http: // localhost: 8080/manager/start? Path =/hello
Terminate an application:
Http: // localhost: 8080/manager/stop? Path =/hello
------ Automatically load the application
The following are three ways to permanently publish an application. Tomcat will automatically load these applications at startup. (Restart the server after the first release ):
(1) Add the following in/conf/server. xml:
<! -- Tomcat a Context -->
<Context path = "/hello" docBase = "g:/myjava/hello" debug = "0"/>
(2) copy the file directory to $ CATALINA_HOME/webapps /.
(3) copy the package (war) to $ CATALINA_HOME/webapps /. Tomcat will automatically unbind the war package.
In fact, you only need to use
"Jdk + tomcat + ant + their documents + notepad + Internet"
You can easily and efficiently compile and debug java web applications. At the same time, you can thoroughly learn java.
Btw: $ build. xml under the CATALINA_HOMEwebappsomcat-docsappdevsample is a great ant build script! You only need to make some necessary modifications, including compiling, releasing, and generating javadoc tasks. We strongly recommend that you !! I didn't learn ant too much. I only needed it.