title: IntelliJ IDEA 13.0.3 and Tomcat 8.0.9. Cant get it to work
body: <p>I'm trying to deploy a Java web application running on Tomcat. I got the book </p>
  
  <blockquote>
    <p>Professional Java for Web Applications: Featuring Websockets, Spring Framework, JPA Hibernate, and Spring Security</p>
  </blockquote>
  
  <p>and I've done everything said to get IntelliJ IDEA 13 work together with Tomcat 8.0.9. I've tested the server container manually and it works great, even deploying .war files works great. However when i move on to start/debug a web application - in this case the first example form the book - from IntelliJ the application wont start. The output in the Tomcat Log doesn't say much.</p>
  
  <p>Server output tells me this: </p>
  
  <pre><code>Connected to server
  [2014-08-08 09:17:35,075] Artifact Sample-Debug-IntelliJ:war exploded: Artifact is      being deployed, please wait...
  [2014-08-08 09:17:35,097] Artifact Sample-Debug-IntelliJ:war exploded: Error during  artifact deployment. See server log for details.
  [2014-08-08 09:17:35,098] Artifact Sample-Debug-IntelliJ:war exploded: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: L:\java-dev\java_web_apps_chapter_code\9781118656464 Full Code\Chapter 02\Sample-Debug-    IntelliJ\target\sample-debug-intellij-1.0.0.SNAPSHOT not found for the web module.
  08-Aug-2014 21:17:44.671 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory L:\java-dev\apache-tomcat-8.0.9\webapps\manager
  08-Aug-2014 21:17:44.939 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory L:\java-dev\apache-tomcat-8.0.9\webapps\manager has finished in 268 ms
  </code></pre>
  
  <p>Tomcat Catalina Log output this:</p>
  
  <pre><code>08-Aug-2014 22:56:35.843 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8.
  08-Aug-2014 22:56:35.846 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
  08-Aug-2014 22:56:36.652 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1g 7 Apr 2014)
  08-Aug-2014 22:56:36.738 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
  08-Aug-2014 22:56:36.746 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
  08-Aug-2014 22:56:36.747 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1060 ms
  08-Aug-2014 22:56:36.771 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
  08-Aug-2014 22:56:36.771 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
  08-Aug-2014 22:56:36.778 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
  08-Aug-2014 22:56:36.784 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
  08-Aug-2014 22:56:36.785 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 38 ms
  08-Aug-2014 22:56:46.785 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory L:\java-dev\apache-tomcat-8.0.9\webapps\manager
  08-Aug-2014 22:56:47.035 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory L:\java-dev\apache-tomcat-8.0.9\webapps\manager has finished in 251 ms
  </code></pre>
  
  <p>I've tried on both Windows and OSX and it's the same story on both with the exact same error.</p>
  
  <p>When i access <code>http://localhost:8080/</code>i can see that the server is up and running. However, the application isn't deployed.</p>
  
  <p>Anyone experiencing the same error as me and/or know a solution?</p>
  
  <p>I'm running IntelliJ IDEA 13.0.3, Java 1.8.0_11 and Tomcat 8.0.9.</p>
  
  <p>EDIT: I've also tried with IntelliJ IDEA 13.1.4. Didn't make any difference.</p>
  
  <hr>
  
  <h2>Steps taken</h2>
  
  <ol>
  <li>Downloaded Java 1.8.0_11, installed it and added it to environment variables.</li>
  <li><p>Downloaded Tomcat, unpacked it and made the following changes to it (step 2-4);
  In <code>conf/tomcat-users.xml</code> i added this user:</p>
  
  <pre><code>&lt;user username="admin" password="admin" roles="manager-gui,admin-gui" /&gt;
  </code></pre></li>
  <li><p>In <code>conf/web.xml</code> i added the code below beneath the <code>org.apache.jasper.servlet.jspServlet</code> element</p>
  
  <pre><code>&lt;init-param&gt;
      &lt;param-name&gt;compilerSourceVM&lt;/param-name&gt;
      &lt;param-value&gt;1.8&lt;/param-value&gt;
  &lt;/init-param&gt;
  &lt;init-param&gt;
      &lt;param-name&gt;compilerTargetVM&lt;/param-name&gt;
      &lt;param-value&gt;1.8&lt;/param-value&gt;
  &lt;/init-param&gt;
  &lt;init-param&gt; 
      &lt;param-name&gt;compiler&lt;/param-name&gt;
      &lt;param-value&gt;modern&lt;/param-value&gt;
  &lt;/init-param&gt;
  </code></pre></li>
  <li><p>Downloaded apache-ant and added a <code>setenv.bat</code> file in the <code>apache-tomcat/bin</code> directory with the following script</p>
  
  <pre><code>export CLASSPATH=L:/java-dev/jdk8/lib/tools.jar:L:/java-dev/apache-ant/lib/ant.jar:L:/java-dev/apache-ant/lib/ant-launcher.jar 
  </code></pre></li>
  <li><p>Started IntelliJ and added the Tomcat application server.</p></li>
  <li><p>Then i imported the project and set it to use the Tomcat server that I just added.</p></li>
  </ol>
  
  <h2>UPDATE: 2014-08-09 16:22</h2>
  
  <p>I tried to deploy a JavaEE web application that IntelliJ created itself, and that worked right away. Seems like it's something wrong with the source code that the book references.</p>