title: How to place images/CSS in spring-mvc web app?
body: <p>I used Netbeans to create a Spring MVC web application. I have a simple controller and JSP view. The JSP view appears correctly except for an image that doesn't render. My directory structure looks like this: </p>
  
  <p><a href="http://i.stack.imgur.com/m7O0K.jpg" rel="nofollow">enter image description here</a>
  In my *.jsp page, the image that doesn't render is referenced like so:
  </p>
  
  <p>In Spring MVC, where should I place files referenced by JSP views, like images, CSS, JS, etc?</p>
  
  <p>I applied AppConfig file like this,. </p>
  
  <pre><code>public void addResourceHandlers(ResourceHandlerRegistry registry) {
  
  @Bean
  public ViewResolver viewResolver() {
      InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
      viewResolver.setViewClass(JstlView.class);
      viewResolver.setPrefix("/WEB-INF/view/");
      viewResolver.setSuffix(".jsp");
  
      return viewResolver;
  }
  </code></pre>