Archive of wiki.eclipse.org/jetty for End of Life (EOL) Eclipse Jetty 7 and Eclipse Jetty 8.

Eclipse Jetty 7 Archive Home

Jetty/HowTo/Using Jetty with IntelliJ

< Jetty

Introduction


You can use Jetty in a variety of ways when developing in IntelliJ.


Embedded Use

An often used way to develop in Intellij is the embedded approach. This strategy involves writing a small main method that starts Jetty and deploys your servlets programmatically. You can control starting and stopping your webapp through normal runtime measures.

Testing Use

A very popular approach to developing in Intellij–and one that we employ heavily in Jetty–is using Jetty with JUnit or the like where in @Before and @After there is a starting and stopping of a Jetty server. If you are interested in this approach, look through the unit tests for things like jetty-server and jetty-client for a wealth of examples. Also look at the embedded-examples project for a number of simple examples for very common usage scenarios. ,