Manual and automatic loading of tomcat applications

Source: Internet
Author: User
Tags manual java web
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.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.