Chris' Tech Blog

February 26, 2010

Get going with Jetty: Run in Eclipse, Change Port in Maven

Filed under: Eclipse, Jetty — Chris Ey @ 2:35 pm

Jetty is a GREAT servlet engine, which I mainly used for development. Yet, you can use it for production as well.

Developing with Jetty is very easy already, but if you need to get going NOW, this may help:

RunJettyRun

If you work with Eclipse, and want an integrated Jetty for development, all you need id this:

http://code.google.com/p/run-jetty-run/wiki/GettingStarted

Change Port when using maven

Jetty runs on port 8080 by default. How you change that port in RunJettyRun is pretty easy (just change the run config).

If you start Jetty using Maven on the command line with this command:

mvn jetty:run

you can change the port by specifying the runtime variable jetty.port. For example, if you want to use port 8900 instead, use the following command:

mvn -Djetty.port=8900 jetty:run

I know this is not rocket science, but this kind of information may help you to get going with Jetty even faster.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress