title: Failed to load resource: the server responded with a status of 404
body: <p>I have an application (Spring 4 MVC+Hibernate 4+MySQL+Maven integration example using annotations) , integrating Spring with Hibernate using annotation based configuration .
  I have a maven project with this structure :</p>
  
  <p><a href="https://i.stack.imgur.com/XLQh9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XLQh9.png" alt="enter image description here"></a></p>
  
  <p>I'd like to reach the <code>home.png</code> image via <code>http://xxx.xxx.221.107:8080/myApp/images/home.png</code>, but I get a 404 </p>
  
  <p>unzipping the war the image is there: <strong>myapp/images/home.png</strong></p>
  
  <p>I've tried as well addind this:</p>
  
  <pre><code>@Configuration
  @EnableWebMvc
  @ComponentScan(basePackages = {"fr.devices"})
  public class AppConfig {
  
      @Bean
      public ViewResolver viewResolver() {
          InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
          viewResolver.setViewClass(JstlView.class);
          viewResolver.setPrefix("/WEB-INF/views/");
          viewResolver.setSuffix(".jsp");
  
          return viewResolver;
      }
  
  
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
      }
  
  
      @Bean
      public MessageSource messageSource() {
          ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
          messageSource.setBasename("messages");
          return messageSource;
      }
  }
  </code></pre>
  
  <p>and moving all the static files into /webapp/resources/
  and from the jsp</p>
  
  <pre><code>&lt;img src="${pageContext.servletContext.contextPath}/resources/images/home.png" width="136" height="43"   /&gt; 
  </code></pre>
  
  <p>with the same result</p>