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