How can I start Jetty from IntelliJ on Windows?

后端 未结 4 1332
有刺的猬
有刺的猬 2020-12-16 05:01

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 Intell

相关标签:
4条回答
  • 2020-12-16 05:03

    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.

    0 讨论(0)
  • 2020-12-16 05:12

    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)

    0 讨论(0)
  • 2020-12-16 05:20

    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.

    Jetty configuration

    0 讨论(0)
  • 2020-12-16 05:21

    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.

    intellij13-jetty9-run-debug-config1

    2. choose the war file to deploy in Deployment tab and setup your context path.

    intellij13-jetty9-run-debug-config2

    0 讨论(0)
提交回复
热议问题