title: JSP cannot find css files while using ResourceHandlerRegistry.addResourceHandler (Java based webConfig)
body: <p>This is where i put my css file:</p>
  
  <p><img src="https://i.stack.imgur.com/Y3SJL.png" alt="enter image description here"></p>
  
  <p>This is how i register this resource:</p>
  
  <pre><code>@Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
       registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
  }
  </code></pre>
  
  <p>This is how i references this css from the JSP:</p>
  
  <pre><code>&lt;link type="text/css" href="/css/bootstrap.css" rel="stylesheet"/&gt;
  </code></pre>
  
  <p><strong>I can see the JSP page with content but without styling.</strong></p>
  
  <p>I think the error is while referencing but i cant find it. I have tried also these, but does not work:</p>
  
  <pre><code>&lt;link type="text/css" href="../css/bootstrap.css" rel="stylesheet"/&gt;
  
  &lt;link type="text/css" href="/resources/css/bootstrap.css" rel="stylesheet"/&gt;
  
  &lt;link type="text/css" href="&lt;%=request.getContextPath() %&gt;/css/bootstrap.css" rel="stylesheet"/&gt;
  
  &lt;link type="text/css" href="&lt;%=request.getContextPath() %&gt;/resources/css/bootstrap.css" rel="stylesheet"/&gt;
  </code></pre>
  
  <p>Any idea?</p>
  
  <p><strong>EDIT:</strong> Now i have moved the css folder to WebContent. It seems like this:</p>
  
  <p><img src="https://i.stack.imgur.com/1RPtI.png" alt="enter image description here"></p>
  
  <p>It still does not work. What should i register for the ResourceHandler? </p>
  
  <pre><code>registry.addResourceHandler("/WEB-INF/**").addResourceLocations("/WEB-INF/"); ?
  </code></pre>
  
  <p>How should i reference the css from the JSP?</p>