注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

姑射道人的博客

博客新地址:nixuchen.com

 
 
 

日志

 
 

Jetty and Eclipse Integration in 3 Steps  

2014-07-10 22:47:32|  分类: java |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

For more info on Jetty, check out our new Jetty Refcard, released today (6/25/12)! -Ed.

 

This tutorial will walk you through out how to integrate Jetty and Eclipse and how to run a web application on Jetty server inside Eclipse.

Steps:

  1. Install Jetty Eclipse plugin
  2. Create web application
  3. Run web application

1 – Installing Jetty Eclipse Plugin

  1. When you add a server to the Servers view, you will not see an option for Jetty as you will find for Tomcat, JBoss, Apache, etc.
  2. First you need to install a plugin.
  3. Go to Eclipse -> Install new Software menu.
  4. Click on add and type Jetty for Name and http://run-jetty-run.googlecode.com/svn/trunk/updatesitefor Location.
  5. Select the Jetty plugin to install. Click on Next and follow the installation:

Jetty loiane 03 Jetty and Eclipse Integration in 3 Steps2 – Creating a Web Application

When you restart Eclipse, got o Project Explorer view or the New menu and click on New -> Dynamic Web Project:

Jetty loiane 04 Jetty and Eclipse Integration in 3 Steps

Configure the Project, create a name for it and click on Next:

Jetty loiane 05 Jetty and Eclipse Integration in 3 Steps

Click on Next:

Jetty loiane 06 Jetty and Eclipse Integration in 3 Steps

Configure the Web Module:

Jetty loiane 07 Jetty and Eclipse Integration in 3 Steps

And the project is create. Create also a index.html file. The project structure should look like this:

Jetty loiane 08 Jetty and Eclipse Integration in 3 Steps

3 – Running the Web Application

Select the application you want to run on Jetty.

Click on the Run button -> Run Configurations.

Jetty loiane 09 Jetty and Eclipse Integration in 3 Steps

Configure your app on Jetty as shown in the picture bellow and click on Run:

Jetty loiane 10 Jetty and Eclipse Integration in 3 Steps

Wait for the server to start. You should get something like the following on your log:

Jetty loiane 11 Jetty and Eclipse Integration in 3 Steps

Open a browser and test the application!

Jetty loiane 12 Jetty and Eclipse Integration in 3 Steps

Done!

Happy Coding!

Published at DZone with permission of Loiane Groner, author and DZone MVB. (source)
  评论这张
 
阅读(716)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017