Jetty/HowTo/Using Jetty with Eclipse

From Eclipsepedia

< Jetty
Revision as of 17:32, 27 April 2011 by Jesse.mcconnell.gmail.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Contents

Introduction

Jetty can be used in a variety of ways when developing in Eclipse.

WTP Style Usage

One generally problematic mechanism that people use is the WTP style approach to webapp development. Under certain circumstances this works for certain people and if it does, great, enjoy. Below is a link to a jetty wtp plugin that was contributed by Angelo Zerr.

Jetty WTP Plugin

Embedded Usage

Another often used mechanism for developing in eclipse is the embedded approach. This strategy involves writing a small main method that starts up jetty and deploys your servlets programmatically and you can control the starting and stopping of your webapp through normal runtime measures.

Testing Usage

A very popular approach to developing in eclipse and one that we employ heavily in jetty is the usage of jetty with junit or the like where in @Before and @After there is a starting and stopping of a jetty server. If your interested in this approach look through the unit tests for things like jetty-server and jetty-client for a wealth of examples. Also the embedded-examples project as a number of simple examples for very common usage scenarios.