Tomcat configuration learning and tomcat configuration Learning
1 server. xml
|
<Host appBase = "d:/aaa">
<Context path = "/smswap" reloadable = "true" docBase = "D: \ workspace \ smswap \ WebRoot"> </Context>
</Host>
Let's first look at appBase, which indicates:
1. The subdirectories under this directory will be automatically deployed as applications.
2. The. war file under this directory will be automatically decompressed and deployed as an application.
DocBase only points to the directory of an application, which has nothing to do with appBase.
Summary:
If you want to specify the path
If you want to make it simple, just copy them to the appBase.
If you repeat them, that is, you can run the two directories, but each subdirectory under your application is actually deployed as a separate application.
For example, if your application is
MyApp, placed in
D: \ project \ myApp
There are 2 subdirectories
D: \ project \ myApp \ images
D: \ project \ myApp \ js
You can use
1. Set appBase to d: \ project for automatic system deployment
2 You can manually specify docBase to d: \ project \ myApp
3. If you specify appBase to d: \ project \ myApp
D: \ project \ myApp \ images is no longer a common subdirectory, but a separate virtual directory or application. Because it is automatically deployed
D: \ project \ myApp \ js
Http://www.blogjava.net/jjshcc/archive/2010/06/16/323659.html |