Tomcat deploys multiple war package projects and configuration domain names

Source: Internet
Author: User

Tomcat deploys multiple war package projects and configuration domain names

1. First, package the war project. First, use DOS to enter the project's root directory cd E:/XXX project/

2. Package command jar cvf XXX project. war */. (You can package all the jar files under lib or put the Jar files under lib to tomcat)

3. Okay. Here is our deployment.

3.1 put the project war package under the tomcat file D: \ apache-tomcat-6.0.37 \ webapps

3.2 after getting started, find the statup under D: \ apache-tomcat-6.0.37 \ bin.

D: \ apache-tomcat-6.0.37 \ webapps. a folder with the same name as the war package is displayed.

3.3 configuration file configuration D: \ apache-tomcat-6.0.37 \ conf server. xml

ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>

Is to configure the port number. The default port number is 8080. The default port number for website requests is 80.

 

// The following figure shows how to configure the host name, which can be the localhost IP Address URL.

UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
// In alias, the configured domain names can be multiple
Www.tbyoung.com
// A corresponding project docBase in the context corresponds to the webroot path in the tomcat-deployed folder.

4. start tomcat. Let's try it.

Www.tbyoung.com is the first project by default.

Www.tbyoung.com/cyfc is directed to the second project

5. I encountered some problems. I couldn't open the test on the local machine (I didn't know what to do at the beginning. After all, I didn't get these things)

After reading some information on the Internet, I found the problem.

Configure a file on your local machine.

Address the hosts file under windows/system32/drivs/etc

Add 127.0.0.1 www.tbyoung.com

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.