Server|xml
The smallest server.xml configuration file for Tomcat 5 is probably as follows:
<server port= "8005" shutdown= "Shutdown" >
<service name= "Catalina" >
<connector port= "8080"/>
<engine name= "Catalina" defaulthost= "localhost" >
<context path= "/bbs" docbase= "Bbs_file"/>
Modified </Host>
</Engine>
</Service>
Ten </Server>
The 3rd line sets the Tomcat listener port. If you want to visit a website on your own machine, enter http://localhost:8080 in the browser.
Host is a virtual hosting, is generally a Web site. The context represents a Web application (Web application), such as a message board for a Web site, and a forum can be a Web application respectively.
Appbase= "/home/ideawu/webapps" means that your site's programs are placed in the/home/ideawu/webapps directory, and you can also use the path relative to the Tomcat installation path, but generally do not.
Path= "/bbs" docbase= "Bbs_file" represents a Web application with a directory of Bbs_file, the program's files are placed in the/home/ideawu/webapps/bbs_file directory, you can go through http:// Localhost:8080/bbs or http://localhost:8080/bbs_file access. In other words, path is a map of docbase.
The homepage of your website should be placed in the/home/ideawu/webapps/root directory by default, you can set the path of the context to the empty string to change.