Tomcat Configuration Learning

Source: Internet
Author: User

1 server.xml

<context path= "/smswap" reloadable= "true" docbase= "D:\workspace\smswap\WebRoot" ></Context>
Let's look at AppBase first, this directory says:
1 subdirectories under this directory will automatically be deployed as apps.
2. War files under this directory will be automatically decompressed and deployed as an app
and docbase just points to your app's directory, which can have nothing to do with appbase.
Summarize:
If you want to specify the path yourself, then you should be in Docbase.
If you want to be simple, just copy them to AppBase.
If you repeat them, 2 points to a directory and looks like it will work, but each subdirectory below your app is actually deployed as a separate application.
For example, your application is
MYAPP, put it in the
D:\project\myApp
There are 2 subdirectories inside.
D:\project\myApp\images
D:\project\myApp\js
You can pass
1 setting AppBase point 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, then
D:\project\myApp\images this will no longer be a normal subdirectory, but rather a separate virtual directory, or it is called an application. Because it is automatically deployed
D:\project\myApp\js also the same consequences

Http://www.blogjava.net/jjshcc/archive/2010/06/16/323659.html

Tomcat Configuration Learning

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.