title: ERROR 1045 --- [nio-8080-exec-8] o.s.boot.context.web.ErrorPageFilter
body: <p>Im doing a task to my university and I want to use Spring Boot. Im not using database, just a fake data class. </p>
  
  <p>When I try to access "/" or my index page I got the following ERROR:</p>
  
  <p><strong>2015-10-25 14:10:41.113 ERROR 1045 --- [nio-8080-exec-8] o.s.boot.context.web.ErrorPageFilter     : Cannot forward to error page for request [/] 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</strong></p>
  
  <p><a href="http://i.stack.imgur.com/85Njr.png" rel="nofollow">That is my file tree</a></p>
  
  <p>My main class:</p>
  
  <pre><code>@SpringBootApplication
  public class Application extends SpringBootServletInitializer {
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  
      public static void main(String[] args) {
       SpringApplication.run(Application.class, args);
  
  
   }
  }
  </code></pre>
  
  <p>My controller class:</p>
  
  <pre><code>@Controller
  public class IndexController {
  
  @Value("${application.message:Hello World}")
  private String message = "Hello World";
  
  @RequestMapping(value="/")
  public String index(Map&lt;String, Object&gt; model){
  
      model.put("message", message);
      return "index";
  }
  
  }
  </code></pre>
  
  <p>My index.jsp</p>
  
  <pre><code>&lt;%@ taglib prefix="spring" uri="http://www. springframework .org/tags"%&gt;
  &lt;html&gt;
  &lt;body&gt;
      &lt;br&gt;
      &lt;br&gt;
      Message: ${message}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My POM</p>
  
  <pre><code>    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;alocation-spring&lt;/groupId&gt;
      &lt;artifactId&gt;alocation-spring&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;alocation-spring Maven Webapp&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;dependencies&gt;
         &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&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.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;finalName&gt;alocation-spring&lt;/finalName&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;useSystemClassLoader&gt;false&lt;/useSystemClassLoader&gt;
                  &lt;logger name="org.springframework.boot.context.web.ErrorPageFilter"&gt;
                      &lt;level value="OFF" /&gt;
                  &lt;/logger&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.2.7.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thank you!</p>