Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just want to configure jetty to listen to more than one port. I don't want multiple instances nor multiple webapps, just one jetty, one webapp, but listening to 2 or more ports.

The default way does not support multiple entries:

<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>

Thank you for your help!

share|improve this question
up vote 2 down vote accepted

In your jetty.xml you have something like this

<Call name="addConnector">
      <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
        <Set name="host"><Property name="" default="x.y.z.v"/></Set>
        <Set name="port"><Property name="jetty.port" default="80"/></Set>
        <Set name="maxIdleTime">300000</Set>
        <Set name="Acceptors">2</Set>
        <Set name="statsOn">false</Set>
        <Set name="confidentialPort">8443</Set>
        <Set name="lowResourcesConnections">20000</Set>
        <Set name="lowResourcesMaxIdleTime">5000</Set>

Just duplicate this block and change the port in the duplicate.

share|improve this answer
That was my first approach, however, something didn't work. Now I tried it again, without problems. Thanks! – Mario Bertschler Aug 2 '11 at 6:24
I've tried the same thing - but cannot get jetty to listen on additional ports – warren Dec 18 '14 at 18:56
if it matters, I'm on Jetty 6.1 (an older app I am not in the position of being able to update) – warren Dec 18 '14 at 19:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.