title: Intellij Tomcat shows 404 upon start up
body: <p>I am using Intellij ultimate to start up a simple service. The structure of the project is like this:
  <a href="https://i.stack.imgur.com/ZRaW4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZRaW4.png" alt="enter image description here"></a></p>
  
  <p>My tomcat configuration as following:
  <a href="https://i.stack.imgur.com/jJbnu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jJbnu.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/ZH9Kp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZH9Kp.png" alt="enter image description here"></a></p>
  
  <p>When launching, the console shows no errors:</p>
  
  <pre><code>        /tmp/apache-tomcat-8.5.38/bin/catalina.sh run
      [2019-02-24 11:24:53,412] Artifact InsbotTomcat:war: Waiting for server connection to start artifact deployment...
      [2019-02-24 11:24:53,412] Artifact web:war exploded: Waiting for server connection to start artifact deployment...
      24-Feb-2019 23:24:54.294 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.38
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 5 2019 11:42:42 UTC
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.38.0
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Mac OS X
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.12.6
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86_64
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_201-b09
      24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
      24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat
      24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /private/tmp/apache-tomcat-8.5.38
      24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/conf/logging.properties
      24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
      24-Feb-2019 23:24:54.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
      24-Feb-2019 23:24:54.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/jmxremote.password
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/jmxremote.access
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
      24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
      24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat
      24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/tmp/apache-tomcat-8.5.38
      24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp/apache-tomcat-8.5.38/temp
      24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/diyu/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
      24-Feb-2019 23:24:54.457 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
      24-Feb-2019 23:24:54.477 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
      24-Feb-2019 23:24:54.494 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
      24-Feb-2019 23:24:54.496 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
      24-Feb-2019 23:24:54.497 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 591 ms
      24-Feb-2019 23:24:54.527 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
      24-Feb-2019 23:24:54.527 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.38
      24-Feb-2019 23:24:54.537 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
      24-Feb-2019 23:24:54.548 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
      24-Feb-2019 23:24:54.549 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 52 ms
      Connected to server
      [2019-02-24 11:24:55,011] Artifact InsbotTomcat:war: Artifact is being deployed, please wait...
      [2019-02-24 11:24:55,012] Artifact web:war exploded: Artifact is being deployed, please wait...
      24-Feb-2019 23:24:58.220 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
      [2019-02-24 11:24:58,277] Artifact InsbotTomcat:war: Artifact is deployed successfully
      [2019-02-24 11:24:58,277] Artifact InsbotTomcat:war: Deploy took 3,266 milliseconds
      [2019-02-24 11:24:58,342] Artifact web:war exploded: Artifact is deployed successfully
      [2019-02-24 11:24:58,342] Artifact web:war exploded: Deploy took 3,330 milliseconds
      24-Feb-2019 23:25:04.541 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/private/tmp/apache-tomcat-8.5.38/webapps/manager]
      24-Feb-2019 23:25:04.573 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/private/tmp/apache-tomcat-8.5.38/webapps/manager] has finished in [32] ms
  </code></pre>
  
  <p>While the auto-opened page shows like this:</p>
  
  <p><a href="https://i.stack.imgur.com/r2rx0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r2rx0.png" alt="enter image description here"></a></p>
  
  <p>I also tried <code>http://localhost:8080/web_war_exploded/index.html</code>, showing the same output.</p>
  
  <p>After <code>Open Module Settings</code>, I have changed the configuration to be this:
  <a href="https://i.stack.imgur.com/EsXXJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EsXXJ.png" alt="enter image description here"></a> </p>
  
  <p>And it works.</p>