title: Spring MVC xml based configuration - blank page
body: <p>I'm trying to write my first Spring MVC application and I got stuck with an issue I can't resolve.   </p>
  
  <p>When I run application on Tomcat  it starts but whenever I request the url handled by the controller it goes into the controller but does not return a view.</p>
  
  <p>I know that there are many similar questions on the web. None of which helped me resolve my problem unfortunately.</p>
  
  <p>So I write in IntellijIdea 2016.2.3 and have Maven support for the project.<br>
  My Tomcat server is 8.5 version.</p>
  
  <p>So I have a controller file that looks as follows:</p>
  
  <p>MyController.java</p>
  
  <pre><code>package com.example.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  /**
   * Created by tomko_2 on 2017-03-07.
   */
  @Controller
  public class MyController {
  
          @RequestMapping("/mytest")
          public String home() {
  
              System.out.println("controller at work");
              return "index";
          }
  }
  </code></pre>
  
  <p>Application.java</p>
  
  <pre><code>package com.example;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.boot.builder.SpringApplicationBuilder;
  import org.springframework.boot.web.support.SpringBootServletInitializer;
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  /**
   * Created by tomko_2 on 2017-03-08.
   */
  @SpringBootApplication
  public class Application extends SpringBootServletInitializer {
  
      public Application() {
          super();
          setRegisterErrorPageFilter(false);
      }
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(Application.class, args);
      }
  
  }
  </code></pre>
  
  <p>Here is my server output log. The second line looks suspicious, but I wasn't able to find why it looks so.  </p>
  
  <pre><code>"C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin\catalina.bat" run
  [2017-03-12 10:22:49,247] Artifact spring-mvc-show:war exploded: Server is not connected. Deploy is not available.
  Using CATALINA_BASE:   "C:\Users\tomko_2\.IntelliJIdea2016.2\system\tomcat\Unnamed_spring-mvc-show"
  Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 8.5"
  Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 8.5\temp"
  Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_73"
  Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin\tomcat-juli.jar"
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.11
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 10 2017 21:02:52 UTC
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.11.0
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 8.1
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.3
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_73\jre
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_73-b02
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\tomko_2\.IntelliJIdea2016.2\system\tomcat\Unnamed_spring-mvc-show
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.5
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\tomko_2\.IntelliJIdea2016.2\system\tomcat\Unnamed_spring-mvc-show\conf\logging.properties
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\tomko_2\.IntelliJIdea2016.2\system\tomcat\Unnamed_spring-mvc-show
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.5
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.5\temp
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.10 using APR version 1.5.2.
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
  12-Mar-2017 22:22:50.475 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
  12-Mar-2017 22:22:51.507 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)
  12-Mar-2017 22:22:51.725 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
  12-Mar-2017 22:22:51.757 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  12-Mar-2017 22:22:51.772 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
  12-Mar-2017 22:22:51.772 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  12-Mar-2017 22:22:51.772 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1872 ms
  12-Mar-2017 22:22:51.835 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
  12-Mar-2017 22:22:51.835 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.11
  12-Mar-2017 22:22:51.851 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
  12-Mar-2017 22:22:51.866 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
  12-Mar-2017 22:22:51.866 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 92 ms
  Connected to server
  [2017-03-12 10:22:51,991] Artifact spring-mvc-show:war exploded: Artifact is being deployed, please wait...
  12-Mar-2017 22:22:54.991 INFO [RMI TCP Connection(5)-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.
  
    .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v1.5.1.RELEASE)
  
  2017-03-12 22:22:56.851  INFO 208 --- [on(5)-127.0.0.1] com.example.Application                  : Starting Application on komp-TN with PID 208 (started by tomko_2 in C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin)
  2017-03-12 22:22:56.866  INFO 208 --- [on(5)-127.0.0.1] com.example.Application                  : No active profile set, falling back to default profiles: default
  2017-03-12 22:22:56.960  INFO 208 --- [on(5)-127.0.0.1] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7de0fc9: startup date [Sun Mar 12 22:22:56 CET 2017]; root of context hierarchy
  2017-03-12 22:22:58.991  INFO 208 --- [on(5)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration' of type [org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  2017-03-12 22:22:59.148  INFO 208 --- [on(5)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'validator' of type [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  2017-03-12 22:22:59.195  INFO 208 --- [on(5)-127.0.0.1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2235 ms
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'errorPageFilter' to: [/*]
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
  2017-03-12 22:23:00.148  INFO 208 --- [on(5)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
  2017-03-12 22:23:00.976  INFO 208 --- [on(5)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7de0fc9: startup date [Sun Mar 12 22:22:56 CET 2017]; root of context hierarchy
  2017-03-12 22:23:01.148  INFO 208 --- [on(5)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/mytest]}" onto public java.lang.String com.example.controller.MyController.home()
  2017-03-12 22:23:01.148  INFO 208 --- [on(5)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity&lt;java.util.Map&lt;java.lang.String, java.lang.Object&gt;&gt; org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
  2017-03-12 22:23:01.148  INFO 208 --- [on(5)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
  2017-03-12 22:23:01.242  INFO 208 --- [on(5)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
  2017-03-12 22:23:01.242  INFO 208 --- [on(5)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
  2017-03-12 22:23:01.335  INFO 208 --- [on(5)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
  2017-03-12 22:23:01.742  INFO 208 --- [on(5)-127.0.0.1] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  2017-03-12 22:23:01.789  INFO 208 --- [on(5)-127.0.0.1] com.example.Application                  : Started Application in 6.251 seconds (JVM running for 12.433)
  2017-03-12 22:23:01.835  INFO 208 --- [on(5)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcher': initialization started
  2017-03-12 22:23:01.835  INFO 208 --- [on(5)-127.0.0.1] o.s.w.c.s.XmlWebApplicationContext       : Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sun Mar 12 22:23:01 CET 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7de0fc9
  2017-03-12 22:23:01.835  INFO 208 --- [on(5)-127.0.0.1] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
  12-Mar-2017 22:23:01.851 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager
  12-Mar-2017 22:23:02.242 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager has finished in 375 ms
  2017-03-12 22:23:04.070  INFO 208 --- [on(5)-127.0.0.1] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  2017-03-12 22:23:04.117  INFO 208 --- [on(5)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcher': initialization completed in 2282 ms
  [2017-03-12 10:23:04,132] Artifact spring-mvc-show:war exploded: Artifact is deployed successfully
  [2017-03-12 10:23:04,132] Artifact spring-mvc-show:war exploded: Deploy took 12 141 milliseconds
  controller at work
  2017-03-12 22:27:25.668 ERROR 208 --- [nio-8080-exec-7] o.s.boot.web.support.ErrorPageFilter     : Cannot forward to error page for request [/mytest] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
  </code></pre>
  
  <p>As you can see controller is running ("controller at work" in second last line), but no view is returned.</p>
  
  <p>My project structure is as follows:  </p>
  
  <pre><code>src  
  ----main  
  --------java  
  ------------com.example  
  ----------------config  
  ----------------controller  
  --------------------MyController.java  
  ----------------Application.java  
  ----test  
  --------java  
  web  
  ----WEB-INF  
  --------pages  
  ------------index.jsp  
  --------applicationContext.xml  
  --------dispatcher-servlet.xml  
  --------web.xml
  ----META-INF
  --------context.xml
  pom.xml
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/dispatcher-servlet.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>dispatcher-servlet.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"&gt;
  
      &lt;context:component-scan base-package="com.example"/&gt;
      &lt;mvc:annotation-driven/&gt;
  
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/pages/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>I have no applicationContext.xml file since I have only one servlet and application is really simple. I just want it to get work.</p>
  
  <p>index.jsp:</p>
  
  <pre><code>&lt;%@ page contentType="text/html;charset=UTF-8" language="java" %&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;$Title$&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    $END$
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>/META-INF/context.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context path="/"&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>edit:<br>
  I put there also my pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;spring-mvc-show&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;4.3.7.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-autoconfigure&lt;/artifactId&gt;
              &lt;version&gt;1.5.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;version&gt;1.4.2.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.5.1&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.2&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Unfortunately my reputation doesn't allow me to include some pictures from IntelliJ, so I'm going to describe it precisely:</p>
  
  <p>file->project structure->facets->web:</p>
  
  <p>I have 2 deployment descriptors there: </p>
  
  <pre><code>Web Module Deployment Descriptor (path_to_project/web/WEB-INF/web.xml)
  
  Tomcat Context Descriptor (path_to_project/web/META-INF/context.xml)
  
  Web Resource Directory (path_to_project/web)
  </code></pre>
  
  <p>file->project structure->facets->spring:  </p>
  
  <pre><code>Spring Application Context (dispatcher-servlet.xml) # here I'm not sure if it should be so, maybe I need applicationContext.xml, but as my project is really simple and based on single servlet I wanted to place all configuration in dispatcher-servlet.xml
  MVC dispatcher servlet context (dispatcher-servlet.xml)
  Application (Application)
  </code></pre>
  
  <p>run->edit configurations:</p>
  
  <p>I have my local Tomcat server registered there.
  In deployment tab I have only war:exploded with applicationContext "/"</p>
  
  <p>Forgive me if I made really silly mistake, but I'm coping with Spring MVC basic configuration for half a week and I'm totally out of ideas what could be wrong there.</p>