[Cicada Hall Learning note]_, Eclipse and Tomcat second--install tomcat&& add Tomcat to eclipse

Source: Internet
Author: User
Tags blank page tomcat server

Come to the ~~~~~ our "Weaver"--tomcat came, the cowherd wait for it! Ha ha!

First, install Tomcat

    • : http://tomcat.apache.org/download-70.cgi

  

    •  Left: The version of Tomcat is selected, for example Tomcat 7. On the right you can choose a different installation version, the red box is the ZIP installation version of Windows,

Choose the same number of bits as your JDK, and you can download it.

    • Installing Tomcat

It is very simple to understand the pressure on the line, after decompression, such as:

    

    • After extracting, select the->startup.bat file under the Bin directory and double-click Run.

  

    • The following interface appears after a successful run (the Run failed window will flash back).

  

    • Successful after entering the browser: in the Address bar enter localhost:8080 carriage return, the following interface appears OK!

    • hahaha, shouts a sound. Isn't it simple!

Second, import Tomcat into eclipse (introducing Tomcat into Eclipse).

Important link to yo, start the formal strings.

    • Introduction process
    • A. Open eclipse, select Window + Show view + servers = Select Tomcat server right-click New , If there is no Tomcat server, double-click the link word to jump to the new window

  

  * (You have already opened the server can choose to skip) if Window + Show view = Servers cannot find servers, see:

    • In the bottom window that is paged out, if there is an already established sever like Tomcat V7 Server, right-click to select New Server,

   If not, is a connection to create a server, click the jump on the line

  

    • B. on the popup page, select the corresponding tomcat server version below Apache For example:tomcat v7.0 Server, Click Next.

    • c. In the second column of the page, fill in the path of the Tomcat root directory to save .

    •   Select Server server under the Server Control window, right-click to select Start, and start Tomcat via Eclipse.

    • Console appears with the following information to indicate that the boot was successful! Go to the browser and test it! Enter localhost:8080 and the Tomcat welcome interface proves that Eclipse and Tomcat have been linked successfully!
    • If there is a 404 error page, please see the last point of Benbow, fix 404 Error!

  

By this point, Eclipse and Tomcat have succeeded in holding hands.

Third, Eclipse creates the Javaweb project and adds the Web project to Tomcat.

    • Select the icon on the far right of Eclipse (the red box on the left), select Java EE on the right side of the pop-up window, and click OK to debug to the Java EE window layout style.

    • In Eclipse's engineering management area, right-click in the blanks and select New->dynamic Web Project to create a Web project

    • Fill in the project name and click Next

    • Next, when you go to the window shown in the next illustration, tick the mark and finish to create the project.

    • When the project is established, it appears that the automatically generated severs project cannot be deleted.

    • Select the Servers control window under the servers right click, select Add and Remover, in the pop-up window, select the project you just created, click Add,

Click Finish to complete the Web project to add to the Tomcat server.

    • Complete the add-on appears as shown

  

    • Launch Tomcat and browse the Web project in your browser!
    • If your address and project name are not written wrong, but the 404 error, even http://localhost:8080/404. Then you should follow the following steps.
    • Resolves an error that started Tomcat with Eclipse and could not find the engineering and welcome interface.

Select Window + Show view + servers = Find the tomcat to be modified and right- click

① Select stop to stop the Tomcat server within eclipse

② Select Add and removeto Delete the project deployed in the Server container

③ Select cleanto clear server container-related data

④ Select open to turn on Tomcat's modify interface

⑤ Find serverslocation, select Second (User tomcat installation)

⑥ Modify The path of the deploy path to G:\tomcat7.0\apache-tomcat-7.0.11\webapps (that is, WebApps below the Tomcat path )

⑦ctrl+s Save Close

It is important to note that the ①②③ must be manipulated, otherwise the following steps will not work.

  

①②③④ operation refer to this figure.

  

⑤⑥⑦ refer to this figure.

    • After creating a blank index.html file in the Web project WebContent, and again to the browser access http://localhost:8080/TestWeb/index.html, a blank page appears, the test succeeds.

  

Write so much good tired ah, crossing give a praise Bai. Let's try the little friends!!!

All the above for today's sharing, if you need to know more in-depth knowledge,

Please enter the Cicada Hall community: http://www.zhiliaotang.com/portal.php;

Reprint please indicate the source;
Please give us a lot of advice! Welcome to advise, non-sincere do not Disturb!!!
---by get_chen

[Cicada Hall Learning note]_, Eclipse and Tomcat second--install tomcat&& add Tomcat to eclipse

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.