How to configure the Tomcat server in the eclipse:eclipse for Java EE Environment and have the Tomcat server appear on the console to deploy the Web app to Tomcat

Source: Internet
Author: User


How to configure Tomcat in the Eclipse environment
    1. Open Eclipse, click on the "Window" menu and select "Preferences" below.
    2. Click the "Server" option and select "Runtime Environments" below.
    3. Click "Add" to add Tomcat.
    4. Click "Next" to select the Tomcat path you have installed.
    5. Click "Finish" to finish.
Build a Web Application
    1. File→New→Dynamic Web Project
    2. Create aDynamic Web Project
    3. Click "Next" Next
    4. Click "Next" Next
    5. Click "Finish" to complete
Have the Tomcat server appear on the console and deploy the Web app to Tomcat
    1. Window→Show View→Servers
    2. Click on the linkNo servers are available. Click ths link to create a new server.to select the Tomcat version in the popup dialog box.
    3. Click "Next" to add our project

      Select the item and click Add, or double-click to add to the right

    4. Click "Finish" to complete



      Return to the Servers panel below, right-click the Tomcat v8.0 Server at localhost node in the Panel, and click Start on the popup shortcut menu to launch the specified Web server. If you start the access directly at this pointhttp://localhost:8080/TomcatTest, you will find that 404 error is reported. This is because we did not add the main page, below add the content of homepage (index.jsp):


      <% @ page language = "java" contentType = "text / html; charset = utf-8" pageEncoding = "utf-8"%>
      <! DOCTYPE html PUBLIC "-// W3C // DTD HTML 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <meta http-equiv = "Content-Type" content = "text / html; charset = ISO-8859-1">
      <title> Welcome page </ title>
      </ head>
      <body>
      Welcome to use eclipse to deploy Tomcat.
      </ body>
      </ html> 
        • 1
        • 2
        • 3
        • 4
        • 5
        • 6
        • 7
        • 8
        • 9
        • 10
        • 11


      Note: Web resources must be added under the Webroot directory.

      At this point, once again to access the link:http://localhost:8080/TomcatTest, the effect is as follows:



How to configure the Tomcat server in the eclipse:eclipse for Java EE Environment and have the Tomcat server appear on the console to deploy the Web app to Tomcat


Related Article

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.