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.