SECTION: 950-IDEs TITLE: IntelliJ QUESTION: How do I run Jetty from IntelliJ IDEA? First set up a minimal jetty configuration in a directory in the source tree: <pre> <code> <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd"> <Configure class="org.mortbay.jetty.Server"> <Set name="Debug" class="org.mortbay.util.Code" type="boolean">false</Set> <Call name="addListener"> <Arg> <New class="org.mortbay.http.SocketListener"> <Set name="Port"> <SystemProperty name="jetty.port" default="8080"/> </Set> </New> </Arg> </Call> <Call name="addWebApplication"> <Arg>/test</Arg> <Arg> <SystemProperty name="jetty.home" default="./"/>src/webapp </Arg> <Set name="virtualHosts"> < Array type="java.lang.String"> <Item>localhost</Item> </Array> </Set> </Call> </Configure> </code> </pre> <P> Be sure that the <code>Arg</code> that sets the path to the webapp in the call to <code>addWebApplication</code> matches the location of your webapp. <P> The next step is to configure IntelliJ IDEA. For this, add the Jetty and and Jasper classlibs to the set of application libraries and add a new starter entry for Jetty: <pre> <code> Main-Class: org.mortbay.jetty.Server Program parameters: path_to/jetty.xml Working Directory: /path_your_source_root </code> </pre> This is all that is neaded to make IDEA run Jetty. You can debug your application like any "normal" application and make use of the new "hotswap" feature. <P> <i>[Contributed by Philipp Meier 26-Mar-2004]</i>