I personally experience setting up the real jetty and eclipse Development Environment

Source: Internet
Author: User

In fact, the establishment of jetty and eclipse development environments is not complicated. It is because the materials are too fragmented and there are many methods, and the results are confusing to everyone, I will summarize my own build process and hope that it will help my friends who will build it later.

Milestone: Enable eclipse to open> install WTP plug-in eclipse> download jetty 8.x> Add jetty server to eclipse> publish our web application to the corresponding jetty Server> for debugging

 

1. First, download an eclipse to download an EE version.

Http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr1

 

2. Download JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html

How to configure your own Java _ home

 

3. Install the jetty WTP plug-in to enable eclipse to have one more jetty server type. Open eclipse to see if it is running normally. If it is running properly, open help> install new software.

Reference: http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Install

Enter: http://download.eclipse.org/jetty/updates/jetty-wtp on work

4. Download jetty 8.18.

Http://eclipse.org/downloads/download.php? File =/jetty/8.1.8.v20121106/Dist/jetty-distribution-8.1.8.v20121106.zip & R = 1

 

5. The key is, how can we make eclipse and jetty work together?

According to the instructions on Eclipse, it is not feasible because details are not explained. Let's take a look at the following:

This link teaches you how to create a jetty server in eclipse

Http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Create_Server

 

6. Create a dynamic Web Application

Step 1: create a dynamic web project, file/New/other select Web/dynamic Web projectnode:

 

Step 2 enter required parameters

Step 3: press the finish button to create the WTP dynamic web project. add all the jar files in the jetty directory!

 

 

 

 

 

Create a webcontent/index.htm file:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Step 5: drag and drop the mywebapp to the jetty Server:

Step 6: start and stop the jetty Server:

Step 7: you will find the following logs after starting the server:


 

How to Use Maven to create your web application csdn?

 

The point is coming !! Remember to add all the jar files in the downloaded jetty server lib directory to your classpath In the config settings of jettyserver !!!!! Otherwise, you cannot publish your web application.

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.