title: Spring boot - how to configure JSP view in JBOSS 7?
body: <p>I'm newbie in spring boot.I am facing a problem while deploying war in Jboss 7.1.1. When i tried to deploy WAR in tomcat, it's running smoothly but when i switched to JBOSS 7, it has stopped application to deploy. </p>
  
  <p>As we know that JBOSS doesn't allow us '/' so to achieve '/*' using dispatcherServlet and try to register it problematically in my @SpringBootApplication annotated class as given below.</p>
  
  <pre><code>@SpringBootApplication
  public class ServletInitializer extends SpringBootServletInitializer {
      @Bean
      public ServletRegistrationBean dispatcherServletRegistration() {
           ServletRegistrationBean registration = new     ServletRegistrationBean(dispatcherServlet(), "/*");
           registration.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME);
           return registration;
        } 
  
      @Bean
      public DispatcherServlet dispatcherServlet() {
        return new DispatcherServlet();
       } 
  
      @Override
       public void onStartup(ServletContext servletContext) throws ServletException    {
          super.onStartup(servletContext);    
       }  
  
       @Override
       protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(AppSpringBootConfig.class);
       }
      }
  </code></pre>
  
  <p>and added below lines in application.properties file</p>
  
  <pre><code> spring.mvc.view.prefix=/WEB-INF/jsp/
   spring.mvc.view.suffix=.jsp
  </code></pre>
  
  <p>I am using @EnableAutoConfiguration so it should automatically mapped return jsp name with file available inside jsp folder. </p>
  
  <p>Instead it give me an error like  <strong>Cannot forward to error page for request [/login] 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>Is it possible to override InternalResourceViewResolver?</p>