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 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!
Changing a Jetty Server PortEither double click the port, or use the content menu. In the Port Number field, replace the current port number, 8080, with the new port number, in this example, 8081. In the main Eclipse toolbar, click File -> Save. You have changed the port.
Configure the built-in web serverUse this spin box to specify the port on which the built-in web server runs. By default this port is set to 63342 through which IntelliJ IDEA accepts connections from services. You can set the port number to any other value starting with 1024 and higher.
jetty , by default, it runs on port 8080, in root context '/'. 2.2 Change a different context path, set seconds to check for changes and automatically hot redeploy. 2.3 Change a different port to start. Alternatively, you can pass a system property jetty.
You can specify the port in the VM-properties in the instance of your Jetty-VM
-Djetty.port=8100
Tested with Jetty 8.1.xxx with IntelliJ 13.1 but should work on many versions I suppose
UPDATE 1: For Jetty 9 (and up probably) following setting should be used, thx Ingo Kegel
-Djetty.http.port=8100
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With