New dynamic Web Project in Eclipse. After writing the code, select Run on server (of course, Server is configured as Tomcat), but after running, we send out the name of the project we created under the Tomcat installation directory. Obviously, the project is not automatically deployed to Tomcat's WebApps.
Don't believe us. After Tomcat in eclipse starts. Enter http://localhost:8080/webDemo/login.jsp (where Webdemo is the engineering name) in the eclipse's built-in browser. can be opened normally. But when we open the http://localhost:8080 on the external browser, we do not appear the desired kitten screen. In other words, Toncat does not start properly. (often we are in the Bin directory after clicking Startup.bat.) The desired kitten can be seen in the input http://localhost:8080)
In order for our project to be automatically deployed to the WebApps directory like Myelipse (you can use Plug-ins, but the eclipse plugin doesn't seem to work, I don't like it anyway). We need to make some simple changes to the Tomcat server we built.
1: Stop the Tomcat server within Eclipse. Stop
2: Delete the project in the run on server before
3: Select Tomcat server under Servers. Right-click and select Open, the following prompts:
Modify server locations (default is the first selection.) If you do not perform a 1, 2-step operation. This option is dimmed and cannot be edited)
Select the second item (Use Tomcat installation (takes ...)
4: Change the following deploy path to WebApps, by default Wptwebapps, above the server path corresponding to the Tomcat installation directory on the computer
5: Save settings. Exit
6: Click Web Project, run as--> run on Server--.....
at this point. The project is automatically deployed under Tomcat's WebApps. You can browse normally after startup.
Note that the Server.xml file is changed in the tomcat--conf directory at this time (Eclipse is automatically modified.) Note that the modified content <context ...