The use of Eclipse development is because the machine is not enough myeclipse,eclipse is also more refreshing than myeclipse, starting faster. Here to build the development environment using: Jdk1.6+tomcat6+eclipse JEE, working directory below the environment directory as follows:
Installation path:
C:\Java\Jdk1.6.0
C:\Java\Jre1.6.0
D:\Tomcat 6.0
D:\workSpace
D:\Eclipse
Configure the Eclipse's development environment to configure the JDK installation path and the Tomcat installation path. Create Dynamic Web Project Engineering Zhgy under Eclipse, when you use new Tomcat in Eclipse to publish Dynamic Web project by starting the Tomcat, the project is not actually published to Tomcat The installation directory is located under the WebApps. This can be viewed in the WebApps directory of the Tomcat installation directory above. From the console output from the startup point of view, the item is published to the following directory:
Info: Set Web App root system property: ' webapp.root ' = [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 \wtpwebapps\zhgy\]
Opening the directory makes it very clear that there is a zhgy such a folder, which is the project directory that we now have access to.
Then open the D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\ directory and see that the structure in this directory is identical to the directory structure of D:\Tomcat 6.0. Just one more Wtpwebapps directory. In fact, the D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\ directory is a clone of Eclipse's D:\Tomcat 6.0 directory, which makes D:\ Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\ also has the ability to function as a source server.
If you have a few new servers, you will be in the D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\ directory in turn appear temp0, Temp1, TEMP2 and other clone servers, But only one clone server can be started at a time, because they all use the same boot port (and, of course, the same shutdown port, and so on).
This will bring us a lot of inconvenience. For example, for the above project, when we are developing, the project needs to put the uploaded images into the upload folder of the project's sibling directory, we will find the picture is uploaded to the directory D:\workSpace\.metadata\.plugins\ Org.eclipse.wst.server.core\tmp0\wtpwebapps\upload\, but cannot access the uploaded picture in the browser. At this point we can manually copy the upload directory whole to D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\, In the browser, you can actually access it. This behavior is caused by the Tomcat server default WebApps for the engineering directory, not the Wtpwebapps directory. To access the Zhgy project under D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\zhgy\ through a browser, is because Eclipse is publishing the project through Tomcat at the D:\workSpace-jx\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\conf The Server.xml file for the directory has the following settings:
XML code 01.<context docbase= "D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\zhgy" Path= "/zhgy" reloadable= "true" source= "Org.eclipse.jst.jee.server:zhgy"/>
We can learn this by looking at the new Tomcat attribute in Eclipse, as shown in the server locations in the following figure: