To modify the default project path for Tomcat

Source: Internet
Author: User
To modify the default work path for Tomcat
I installed the Tomcat installation version, not directly extract the green version, because the personal feeling to use to open the DOS box, so ugly, so find the installation version, and the day-to-day installation of software, execution has been clicked "next" but, note that midway need to specify your own machine Java environment, My point is: D:\Java\jdk1.7.0_40\jre is good, after the installation is completed, they will start, in the lower right corner of the computer, you can see this icon:
 
If you have already started, you can also right-click the icon to change the state, these steps can be completed after the installation of their own thinking.

After the Tomcat installation is complete, the home directory will be the default, in the place where you install the file: D:\Apache Software foundation\tomcat 7.0\webapps\root, the specific letter will be based on your own installation path, But that root folder is the default working folder. This is actually the same as installing IIS. In this there are a lot of papers, you can see. Since it is the default, of course, it can be modified, you need to modify the location in the Config folder, here is the place to change the configuration.

The way to modify it is as follows: Open the "server.xml" file in the Config folder, ignore a lot of comments, find a place with <Host></Host> tags



Then add a label below it:

<context path = "" Docbase= "F:/jspdocument"
debug= "0" reloadable= "true"/>

The path followed by Docbase is the path to the actual work, save the changes, and then add your own files to the folder, and if you modify the homepage, change it in "web.xml" under CONFIG. Then you can publish your own JSP.

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.