Question: In IntelliJ 13.0.2 Ultimate I've set up a web application module using Jetty 9.1.4.

I'd like to test my application on port 8100, but I can't figure out a way to change the port of my "Local" Jetty run configuration. It always seems to use the default port 8080.

There is a setting for the port in the IntelliJ run configuration but it only appears when configuring a "remote" server.

I've tried adding my own .mod file to the Jetty Server Settings containing the following but it seems to be ignored.

```
[ini-template]
jetty.port=8100

```

One of the answers in [this post](https://stackoverflow.com/questions/15654476/how-can-i-start-jetty-from-intellij-on-windows) says the port is 8080 unless you change it, but he doesn't say how to change it.

Can someone point me in the right direction? Thanks!

Answer: 
You can change the Jetty port in the file start.d/http.ini, e.g.

```
## HTTP port to listen on
jetty.port=8180

```
Neither of the suggeted above worked for me. The only way I found was to add

```
<Configure class="org.eclipse.jetty.server.Server" id="Server">
....
    <Set name="connectors">
        <Array type="org.eclipse.jetty.server.Connector">
            <Item>
                <New class="org.eclipse.jetty.server.ServerConnector">
                    <Arg><Ref refid="ExampleServer"/></Arg>
                    <Set name="port">8081</Set>
                </New>
            </Item>
        </Array>
</Set>

```

to the tmp context generated by Idea, one that appears last in the command line it uses to start jetty:

```
/opt/java/bin/java -... org.eclipse.jetty.start.Main etc/jetty-jmx.xml /tmp/context6config/contexts-config.xml

```

The jetty I tried with was 9.3.5