Configure Tomcat in Eclipse and create a Web project

Source: Internet
Author: User

Configure Tomcat in Eclipse and create a Web project
First, set up Tomcat in eclipse
setting of 1.Tomcat position
Eclipse to start Tomcat, you must know where you are.
In the menu window-preferences, select Tomcat, based on the current version (6.0), select "Version 6.x". Then click the "Browse ..." button and select Tomcat Home.

2. In the "Servers" sub-window that manages the specific server, click the right mouse button "New"-"Server"

3. Double-click the new server, and in the Overview window, select the option for server locations as the second "Use Tomcat installation (takes control of ...)". At this point, the "Configuration path" automatically becomes the Tomcat home directory set in step 1th.

Note: The server locations is grayed out, and if you need to change the settings, you need to remove the items associated with the Tomcat server, and you can modify the status of the Tomcat server with the right-click menu clean.

The web app was built under Eclipse, but when it was released it was found to be published only in the Eclipse directory. and by double-clicking the server, you find that the "Server locations options are gray" and do not let you specify the publishing path you want.
The workaround is to first delete all servers that are established under current eclipse, and to remove the server and application associations altogether. Then add an external server again. Instead of binding the app to the server, double-clicking the server, entering the property editor, you'll find that the "Server Locations" option is optional, and you can choose the path you want to publish to. If I want to publish my project to my locally installed tomcat.

Second, create a JSP project and join the Tomcat server
1. New-Dynamic Web Project, and writing JSP page code

2. Right-click on the server in the Servers window and select "Add and Rmove ..." To add the project to the server

3. Select a page to run in the project

Configure Tomcat in Eclipse and create a Web project

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.