Reputation: 33591
Normally when I want to change Jetty's port I can do so from the config files. It appears changing the config files for Jetty does not affect the instance that is created by the Intellij 2016 plugin.
Unlike the Intellij Tomcat plugin there is no place to change the port which jetty runs on.
Since our work blocks port 8080 I have to change this port to something else but have been unable to do so.
EDIT:
I tried changing start.ini in my Jetty directory like so...
But it still shows this error when I run/debug jetty from Intellij's plugin.
Upvotes: 0
Views: 2238
Reputation: 1
i found this item on plugin of jetty in intellyj folder jettyPlugin
then in star.ini file i set jetty.port=8080 Start.ini
and my server star at 8085 port
Upvotes: -1
Reputation: 36
No method works with the current version of jetty (9.3.9)
the plug-in doesn't seem to have been updated for ages because it had been, it should just allow the selection of a start.ini
where one can simply config everything you are likely to need.
So, it doesn't matter if you configure it in the start.ini
in the jetty home directory, or even directly in the etc/jetty-http.xml
, the plugin will do its own stupid thing and run it on port 8080
.
Upvotes: 2
Reputation: 438
What version of Jetty are you using? As Vojtech has mentioned, this cannot be done within the plugin. What I am currently doing, so I can run two projects at the same time is, have one Jetty instance as 8080 as the distribution comes as and then have another distribution downloaded and change the etc/jetty.xml file to the following:
<Set name="port"><Property name="jetty.port" default="8085"/></Set>
I've also changed a few other spots where 8080 is referenced in the xml's. jetty-fileserver.xml, jetty-spdy-proxy.xml and jettyspdy.xml
This is working on Jetty 7.6.14, hope this helps!
Upvotes: 0
Reputation: 17095
There is no way to set it directly in the plugin itself. You can, however, set it in your Jetty Server installation folder.
# jetty.http.port=8080
(remove # sign)jetty.http.port=8081
Now when you run the jetty from idea, it should have the port you set in the config file.
Upvotes: 0