Reputation: 23800
I am using Windows 7 and IntelliJ 12. I downloaded Tomcat and I can use it just fine. I want to use Jetty as well. But I wasn't able to.
Is Jetty coming with IntelliJ ?
Can someone guide me how to use Jetty? Thanks.
Upvotes: 7
Views: 28623
Reputation: 22041
Yes, IntelliJ brings Jetty support, but only in Ultimate Edition.
If you do have it you'll need to create Jetty Run/Debug Configuration and fill in the required details.
Upvotes: 6
Reputation: 23800
You can also simply use the maven plugin if your project is a maven project..
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.9.v20130131</version>
<configuration>
<webApp>
<contextPath>/${project.artifactId}</contextPath>
</webApp>
<stopKey>STOP</stopKey>
<stopPort>9999</stopPort>
<scanIntervalSeconds>5</scanIntervalSeconds>
</configuration>
</plugin>
Then simply run jetty-run.
Upvotes: 2
Reputation: 1696
I have the same confusion before I fix it. Given my solution, hope it helps for somebody.
My environment: Jetty 9.1 and Intellij 13.0.1
1. note two points: the default port is 8080 unless you changed it; jmx mod must be chosen.
2. choose the war file to deploy in Deployment
tab and setup your context path.
Upvotes: 5
Reputation: 192
One reason you might see the error is if you forgot to specify an artifact to deploy. Go to the Run/Debug Configurations Deployment tab and add your artifact. (Using IntelliJ IDEA 12.1.4 ultimate)
Upvotes: 2