run jetty on something other than localhost

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

run jetty on something other than localhost

Will Berger
Does anyone know how to make jetty bind to a host other than localhost.  Saw references to how to change the port.
Can't figure out how to make it bind to another host.  I would like to do this via the maven plugin.

Currently I use the -Djetty.port parameter in the mvn java options to change the port.  Would like to change localhost to the name of the machine.

Any help much appreciated.

Will
Reply | Threaded
Open this post in threaded view
|

Re: run jetty on something other than localhost

jan_bartel
Hi Will,

Check out the section Configuration Common to all Goals,
in particular the example and the <connector> element of
the <configuration>:

http://jetty.mortbay.org/maven-plugin/howto.html

You just need to configure the connector like:

    <connectors>
      <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
         <port>xxx</port>
         <host>yyy</host>
      </connector>
    </connectors>

cheers
Jan

Will Berger wrote:

> Does anyone know how to make jetty bind to a host other than localhost.  Saw
> references to how to change the port.
> Can't figure out how to make it bind to another host.  I would like to do
> this via the maven plugin.
>
> Currently I use the -Djetty.port parameter in the mvn java options to change
> the port.  Would like to change localhost to the name of the machine.
>
> Any help much appreciated.
>
> Will


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support